diff options
author | Takumi Asaki <asaki@sra.co.jp> | 2014-03-04 15:59:34 +0900 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-06 02:29:16 +0100 |
commit | 1a38f519cbc0890d8f0163ab35c140592ab204ac (patch) | |
tree | 4abac18ed0947864c971c7db2a8aaf395d84bcb9 /src/quick/doc | |
parent | b23b32f64f32c10795d150f7f26a20e48bd9a05e (diff) |
Doc: Fix "Right-to-left User Interfaces"
* Change from QApplication to QGuiApplication
* Change from qmlviewer to qmlscene
Change-Id: I6ceee763c125c4896905884f55437e3f375408d7
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Diffstat (limited to 'src/quick/doc')
-rw-r--r-- | src/quick/doc/src/concepts/positioning/righttoleft.qdoc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/quick/doc/src/concepts/positioning/righttoleft.qdoc b/src/quick/doc/src/concepts/positioning/righttoleft.qdoc index 5d173efedb..c90aa3af22 100644 --- a/src/quick/doc/src/concepts/positioning/righttoleft.qdoc +++ b/src/quick/doc/src/concepts/positioning/righttoleft.qdoc @@ -139,16 +139,16 @@ The painting of these icons can be mirrored with a dedicated \c mirror property \section1 Default layout direction The \l {QtQml::Qt::application}{Qt.application.layoutDirection} property can be used to query the active layout direction of the -application. It is based on QApplication::layoutDirection(), which most commonly determines the layout +application. It is based on QGuiApplication::layoutDirection(), which most commonly determines the layout direction from the active language translation file. To define the layout direction for a particular locale, declare the dedicated string literal -\c QT_LAYOUT_DIRECTION in context \c QApplication as either "LTR" or "RTL". +\c QT_LAYOUT_DIRECTION in context \c QGuiApplication as either "LTR" or "RTL". You can do this by first introducing this line \code -QT_TRANSLATE_NOOP("QApplication", "QT_LAYOUT_DIRECTION"); +QT_TRANSLATE_NOOP("QGuiApplication", "QT_LAYOUT_DIRECTION"); \endcode somewhere in your QML source code and calling \c lupdate to generate the translation source file. @@ -162,7 +162,7 @@ This will append the following declaration to the translation file, where you ca \code <context> - <name>QApplication</name> + <name>QGuiApplication</name> <message> <location filename="myapp.qml" line="33"/> <source>QT_LAYOUT_DIRECTION</source> @@ -175,20 +175,20 @@ You can test that the layout direction works as expected by running your Qt Quic the compiled translation file: \code -qmlviewer myapp.qml -translation myapp.qm +qmlscene myapp.qml -translation myapp.qm \endcode -You can test your application in right-to-left layout direction simply by executing qmlviewer with a +You can test your application in right-to-left layout direction simply by executing qmlscene with a command-line parameter "-reverse": \code -qmlviewer myapp.qml -reverse +qmlscene myapp.qml -reverse \endcode The layout direction can also be set from C++ by calling the static function \l QGuiApplication::setLayoutDirection(): \code -QApplication app(argc, argv); +QGuiApplication app(argc, argv); app.setLayoutDirection(Qt::RightToLeft); \endcode |