diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-04-28 04:57:49 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-04-28 04:57:49 (GMT) |
commit | c139630bb792e3d0e364c05c7be3e190bfd90b64 (patch) | |
tree | 1e5f16a1b65ef1cab34989ef776a353d94c1dc85 /examples | |
parent | 72dfac4fbe7a45ca84ce233eb68161c685bdc31c (diff) | |
parent | a6ffd7c7c28066f2794579bc40e7b9517e76d1ff (diff) | |
download | Qt-c139630bb792e3d0e364c05c7be3e190bfd90b64.zip Qt-c139630bb792e3d0e364c05c7be3e190bfd90b64.tar.gz Qt-c139630bb792e3d0e364c05c7be3e190bfd90b64.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
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..7aaf51a 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 + ' button: ' + (mouse.button == Qt.RightButton ? 'right' : 'left') + ' Shift: ' + (mouse.modifiers & Qt.ShiftModifier ? 'true' : 'false') + ')')" + 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')" |