summaryrefslogtreecommitdiffstats
path: root/examples/declarative/dynamic/qml/PaletteItem.qml
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-05-07 02:10:33 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-05-07 02:10:33 (GMT)
commit62a65081a37ed9a51b0d39d1e740345d77f7bec0 (patch)
treee6caceb16541f190a7e660cfd0980a0594331307 /examples/declarative/dynamic/qml/PaletteItem.qml
parent2df493e9f0660be7d9b5ba691883e13fa12cde72 (diff)
downloadQt-62a65081a37ed9a51b0d39d1e740345d77f7bec0.zip
Qt-62a65081a37ed9a51b0d39d1e740345d77f7bec0.tar.gz
Qt-62a65081a37ed9a51b0d39d1e740345d77f7bec0.tar.bz2
Clean up example code, add white background behind text
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);
}
}