Skip to content

Commit 416e3f0

Browse files
committed
Add an example of binding LayoutMirroring to the app's layoutDirection
Change-Id: I81aa96641d9bef35e003b67e691607a926c087d7 Reviewed-by: Lars Knoll <[email protected]>
1 parent efa0dac commit 416e3f0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/quick/items/qquickitem.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,6 +1544,13 @@ QQuickKeysAttached *QQuickKeysAttached::qmlAttachedProperties(QObject *obj)
15441544
mirroring is not the desired behavior, or if the child item already implements mirroring in
15451545
some custom way.
15461546
1547+
To set the layout direction based on the \l {Default Layout Direction}{default layout direction}
1548+
of the application, use the following code:
1549+
1550+
\code
1551+
LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
1552+
\endcode
1553+
15471554
See \l {Right-to-left User Interfaces} for further details on using \c LayoutMirroring and
15481555
other related features to implement right-to-left support for an application.
15491556
*/

0 commit comments

Comments
 (0)