Search code examples
listqtqt4qml

Swipe to delete in QML


Is it possible to delete items from a ListView in QML like on webOS, i.e. after swiping the entry there's "cancel" and "delete".

I'd like to use Qt 4.7 (so QtQuick 1.1)


Solution

  • There is no default component in QtQuick that can handle gesture signals. There was a Qt labs project that introduced a GestureArea that may do what you want. It was not pacakged with QtQuick 1.1 and I am unsure as to its current status but feel free to give it a try. http://blog.qt.digia.com/blog/2010/10/05/getting-in-touch-with-qt-quick-gestures-and-qml/ Otherwise, there is no QML solution although Qt itself does have gesture programming support http://qt-project.org/doc/qt-4.7/gestures-overview.html