diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-04-27 10:32:45 (GMT) |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-04-27 10:32:45 (GMT) |
commit | 1d01ff1e958a632e665084cf6dbf7c6bbaf4f0c5 (patch) | |
tree | 2e75dac2926f2f459fa8adc42febe1244c95ba8c /examples | |
parent | e793ab29e651a7b07354224a82343d66c265f361 (diff) | |
parent | eae3489b3f2fba9d733ca50eb89dc92a6e96e6f8 (diff) | |
download | Qt-1d01ff1e958a632e665084cf6dbf7c6bbaf4f0c5.zip Qt-1d01ff1e958a632e665084cf6dbf7c6bbaf4f0c5.tar.gz Qt-1d01ff1e958a632e665084cf6dbf7c6bbaf4f0c5.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git://scm.dev.nokia.troll.no/qt/kinetic into kinetic-declarativeui-qfx
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/connections/connections.qml | 6 | ||||
-rw-r--r-- | examples/declarative/listview/listview.qml | 2 | ||||
-rw-r--r-- | examples/declarative/mouseregion/mouse.qml | 12 |
3 files changed, 10 insertions, 10 deletions
diff --git a/examples/declarative/connections/connections.qml b/examples/declarative/connections/connections.qml index 3146338..45c0e99 100644 --- a/examples/declarative/connections/connections.qml +++ b/examples/declarative/connections/connections.qml @@ -1,9 +1,9 @@ <Rect id="rect" color="blue" width="40" height="30"> <Rect id="dot" color="red" width="3" height="3" x="{rect.width/2}" y="{rect.height/2}"/> <MouseRegion id="mr" anchors.fill="{rect}"/> - <Connection sender="{mr}" signal="clicked(x,y)"> + <Connection sender="{mr}" signal="clicked(mouse)"> color="green"; - dot.x = x-1; - dot.y = y-1; + dot.x = mouse.x-1; + dot.y = mouse.y-1; </Connection> </Rect> diff --git a/examples/declarative/listview/listview.qml b/examples/declarative/listview/listview.qml index 08c8f18..6cacdd1 100644 --- a/examples/declarative/listview/listview.qml +++ b/examples/declarative/listview/listview.qml @@ -74,7 +74,7 @@ Note that we specify the 'children' property. This is because the default property of a ListView is 'delegate'. --> - <Rect y="{List3.yPosition+125}" width="200" height="50" color="#FFFF88" z="0"/> + <Rect y="125" width="200" height="50" color="#FFFF88" z="-1"/> </children> </ListView> diff --git a/examples/declarative/mouseregion/mouse.qml b/examples/declarative/mouseregion/mouse.qml index f0f22ac..9581da2 100644 --- a/examples/declarative/mouseregion/mouse.qml +++ b/examples/declarative/mouseregion/mouse.qml @@ -1,10 +1,10 @@ <Rect color="white" width="200" height="200"> <Rect width="50" height="50" color="red"> <Text text="Click" anchors.centeredIn="{parent}"/> - <MouseRegion onPressed="print('press (x: ' + x + ' y: ' + y + ')')" - onReleased="print('release (x: ' + x + ' y: ' + y + ' isClick: ' + isClick + ' followsPressAndHold: ' + followsPressAndHold + ')')" - onClicked="print('click (x: ' + x + ' y: ' + y + ' followsPressAndHold: ' + followsPressAndHold + ')')" - onDoubleClicked="print('double click (x: ' + x + ' y: ' + y + ')')" + <MouseRegion onPressed="print('press (x: ' + mouse.x + ' y: ' + mouse.y + ')')" + onReleased="print('release (x: ' + mouse.x + ' y: ' + mouse.y + ' isClick: ' + mouse.isClick + ' wasHeld: ' + mouse.wasHeld + ')')" + onClicked="print('click (x: ' + mouse.x + ' y: ' + mouse.y + ' wasHeld: ' + mouse.wasHeld + ')')" + onDoubleClicked="print('double click (x: ' + mouse.x + ' y: ' + mouse.y + ')')" onPressAndHold="print('press and hold')" onExitedWhilePressed="print('exiting while pressed')" onReenteredWhilePressed="print('reentering while pressed')" anchors.fill="{parent}"/> @@ -14,8 +14,8 @@ <MouseRegion drag.target="{parent}" drag.axis="x" drag.xmin="0" drag.xmax="150" onPressed="print('press')" - onReleased="print('release (isClick: ' + isClick + ') (followsPressAndHold: ' + followsPressAndHold + ')')" - onClicked="print('click' + '(followsPressAndHold: ' + followsPressAndHold + ')')" + onReleased="print('release (isClick: ' + mouse.isClick + ') (wasHeld: ' + mouse.wasHeld + ')')" + onClicked="print('click' + '(wasHeld: ' + mouse.wasHeld + ')')" onDoubleClicked="print('double click')" onPressAndHold="print('press and hold')" onExitedWhilePressed="print('exiting while pressed')" |