diff options
Diffstat (limited to 'examples/declarative/toys/dynamicscene/qml/PaletteItem.qml')
-rw-r--r-- | examples/declarative/toys/dynamicscene/qml/PaletteItem.qml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml b/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml new file mode 100644 index 0000000..dcb5cc3 --- /dev/null +++ b/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml @@ -0,0 +1,19 @@ +import Qt 4.7 +import "itemCreation.js" as Code + +Image { + id: paletteItem + + property string componentFile + property string image + + source: image + + MouseArea { + anchors.fill: parent + + onPressed: Code.startDrag(mouse); + onPositionChanged: Code.continueDrag(mouse); + onReleased: Code.endDrag(mouse); + } +} |