summaryrefslogtreecommitdiffstats
path: root/examples/declarative/positioners/layoutdirection
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-03-10 09:37:43 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-03-10 09:37:43 (GMT)
commitd63778ce3942130eb6fdd8ef173ba50ed0f49a5c (patch)
tree9372875f01439616e7b45f1f18f5e5d0478e6ba8 /examples/declarative/positioners/layoutdirection
parentb18bd68dd05f000c65e33a975bca6bf24dabb8d3 (diff)
parentaf33f9f2e7ec433b81f5c18e3e7395db4a56c5fe (diff)
downloadQt-d63778ce3942130eb6fdd8ef173ba50ed0f49a5c.zip
Qt-d63778ce3942130eb6fdd8ef173ba50ed0f49a5c.tar.gz
Qt-d63778ce3942130eb6fdd8ef173ba50ed0f49a5c.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (27 commits) AnimatedImage does not change progress value Fix failing tests Fix line information for dynamic slots in .qml files Add missing header include missing from the previous commit Fix horizontal alignment of QTextDocument-based RTL text The rotation reported by PinchArea should not be in the range -180..180 Revert to previous lineHeight behavior. Use the text layout bounds calculated by QLayout. Fix TextInput key navigation for RTL text Base empty QML editor horizontal alignment on QApplication::keyboardInputDirection() Include dynamic parenting use cases in layout mirroring autotests PinchArea example produced incorrect scaling. Fix documentation talking about old property LayoutMirror::mirror Reverse horizontal alignment of QML editors when the layout mirroring is enabled Update QtDeclarative def files Removal of text alignment layout direction dependency was missing couple of changes Fix RTL multiline Text drawing Remove text alignment of empty QML editors following the layout direction Add a way to query the reading direction of QML editor text Make sure horizontal QML editor text aligment always returns the actual alignment ...
Diffstat (limited to 'examples/declarative/positioners/layoutdirection')
-rw-r--r--examples/declarative/positioners/layoutdirection/layoutdirection.qml22
1 files changed, 21 insertions, 1 deletions
diff --git a/examples/declarative/positioners/layoutdirection/layoutdirection.qml b/examples/declarative/positioners/layoutdirection/layoutdirection.qml
index 3e23b15..080010e 100644
--- a/examples/declarative/positioners/layoutdirection/layoutdirection.qml
+++ b/examples/declarative/positioners/layoutdirection/layoutdirection.qml
@@ -41,10 +41,13 @@
import QtQuick 1.1
Rectangle {
+ property bool mirror
+ property int direction: Qt.application.layoutDirection
+ LayoutMirroring.enabled: mirror
+ LayoutMirroring.childrenInherit: true
width: column.width + 100
height: column.height + 100
- property int direction: Qt.application.layoutDirection
Column {
id: column
@@ -133,6 +136,23 @@ Rectangle {
anchors.fill: parent
}
}
+ Rectangle {
+ height: 50; width: parent.width
+ color: mouseArea2.pressed ? "black" : "gray"
+ Text {
+ text: mirror ? "Mirrored" : "Normal"
+ color: "white"
+ font.pixelSize: 16
+ anchors.centerIn: parent
+ }
+ MouseArea {
+ id: mouseArea2
+ onClicked: {
+ mirror = !mirror;
+ }
+ anchors.fill: parent
+ }
+ }
}
Component {