aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-02-16 10:24:24 +0100
committerMitch Curtis <mitch.curtis@qt.io>2018-03-08 07:08:00 +0000
commit416e3f080fa71249fd5be417d6abef5817f2197d (patch)
treea5713358264e5367baccee5028d01b66a382e242 /src/quick/items
parentefa0dac9c4c456793f9e0e706a3b026ed0941801 (diff)
Add an example of binding LayoutMirroring to the app's layoutDirection
Change-Id: I81aa96641d9bef35e003b67e691607a926c087d7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/quick/items')
-rw-r--r--src/quick/items/qquickitem.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index ea24bfcad5..3a0aea517c 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -1544,6 +1544,13 @@ QQuickKeysAttached *QQuickKeysAttached::qmlAttachedProperties(QObject *obj)
mirroring is not the desired behavior, or if the child item already implements mirroring in
some custom way.
+ To set the layout direction based on the \l {Default Layout Direction}{default layout direction}
+ of the application, use the following code:
+
+ \code
+ LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
+ \endcode
+
See \l {Right-to-left User Interfaces} for further details on using \c LayoutMirroring and
other related features to implement right-to-left support for an application.
*/