Drag and Drop within a GridView

From Qt Wiki
Revision as of 15:22, 14 January 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

English | 日本語 | Български

This wiki entry is created in response to a few forum threads (links at bottom) asking for this method. Feel free to contribute to this article with explanations or code.

Drag and Drop within a GridView

This example will demonstrate the iOS style (video here [youtube.com] ) of dragging and dropping ListModel elements within a GridView.

There are three files in this example. One for the model (WidgetModel.qml), one for the delegate (IconItem.qml) and one for the GridView (Main.qml).

WidgetModel.qml

IconItem.qml

Main.qml

Video

Relevant forum threads:
iOS Style Rearrange of Icons [developer.qt.nokia.com]
QML and Drag and Drop [developer.qt.nokia.com]

Categories: