summaryrefslogtreecommitdiffstats
path: root/examples/declarative/dynamic/qml/PaletteItem.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/dynamic/qml/PaletteItem.qml')
-rw-r--r--examples/declarative/dynamic/qml/PaletteItem.qml16
1 files changed, 11 insertions, 5 deletions
diff --git a/examples/declarative/dynamic/qml/PaletteItem.qml b/examples/declarative/dynamic/qml/PaletteItem.qml
index e8f2ed4..dcb5cc3 100644
--- a/examples/declarative/dynamic/qml/PaletteItem.qml
+++ b/examples/declarative/dynamic/qml/PaletteItem.qml
@@ -1,13 +1,19 @@
import Qt 4.7
import "itemCreation.js" as Code
-GenericItem {
- id: itemButton
- property string file
+Image {
+ id: paletteItem
+
+ property string componentFile
+ property string image
+
+ source: image
+
MouseArea {
- anchors.fill: parent;
+ anchors.fill: parent
+
onPressed: Code.startDrag(mouse);
- onPositionChanged: Code.moveDrag(mouse);
+ onPositionChanged: Code.continueDrag(mouse);
onReleased: Code.endDrag(mouse);
}
}