0
votes

I know I can use QML to display a flickable list. But I can not understand how to make qml and c++ application run together. So I choose to implement it without qml. I have subclass ListView class,MyListView, and call setAttribute(Qt::WA_AcceptTouchEvents) in the construction function. in MyListView::event(QEvent *event) , the touchevent triggers when I tap the scroll bar of the listview, but it does not trigger when I tap the listview item. How can I do it?

1

1 Answers

2
votes

If anyone still needs this , If you want QAbstractScrollArea and its subclasses to have kinetic scrolling , there is an implementation provided here http://blog.codeimproved.net/2010/12/kinetic-scrolling-with-qt-the-what-and-the-how/