summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/declarative/declarativeui.qdoc3
-rw-r--r--doc/src/declarative/qmldebugging.qdoc16
-rw-r--r--doc/src/declarative/qmli18n.qdoc29
-rw-r--r--doc/src/index.qdoc2
4 files changed, 40 insertions, 10 deletions
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
index 637e5f1..4d2b09c 100644
--- a/doc/src/declarative/declarativeui.qdoc
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
-\title Declarative UI
+\title Declarative UI (QML)
\page declarativeui.html
\brief The Qt Declarative module provides a declarative framework for building
@@ -102,5 +102,6 @@ completely new applications. QML is fully \l {Extending QML}{extensible from C+
\o \l {Extending QML}
\o \l {QML Internationalization}
\o \l {QtDeclarative Module}
+\o \l {Debugging QML}
\endlist
*/
diff --git a/doc/src/declarative/qmldebugging.qdoc b/doc/src/declarative/qmldebugging.qdoc
index 13ad5f7..a6def19 100644
--- a/doc/src/declarative/qmldebugging.qdoc
+++ b/doc/src/declarative/qmldebugging.qdoc
@@ -45,7 +45,7 @@
\section1 Logging
-console.log can be used to print debugging information to the console. For example:
+\c console.log can be used to print debugging information to the console. For example:
\qml
Rectangle {
@@ -57,6 +57,13 @@ Rectangle {
}
\endqml
+\section1 Debugging Transitions
+
+When a transition doesn't look quite right, it can be helpful to view it in slow
+motion to see what is happening more clearly. \l {qmlviewer} provides a
+"Slow Down Animations" menu option to facilitate this.
+
+
\section1 The QML Inspector
The \c qmldebugger tool provides an experimental inspector to aid with debugging.
@@ -110,11 +117,4 @@ to an available port number and run the \c qmlviewer. For example:
Then in another process, start the \c qmldebugger tool, enter the port number into the corresponding spinbox
in the top right hand corner, and press the "Connect" button.
-
-\section1 Debugging Transitions
-
-When a transition doesn't look quite right, it can be helpful to view it in slow
-motion to see more clearly what is happening. \l {qmlviewer} provides a menu option
-"Slow Down Animations" to facilitate this.
-
*/
diff --git a/doc/src/declarative/qmli18n.qdoc b/doc/src/declarative/qmli18n.qdoc
index 4b62fcb..0c8b1d1 100644
--- a/doc/src/declarative/qmli18n.qdoc
+++ b/doc/src/declarative/qmli18n.qdoc
@@ -43,6 +43,8 @@
\page qmli18n.html
\title QML Internationalization
+\section1 Overview
+
Strings in QML can be marked for translation using the qsTr(), qsTranslate(),
QT_TR_NOOP(), and QT_TRANSLATE_NOOP() functions.
@@ -63,4 +65,31 @@ capabilities are described more fully in:
You can test a translation in \l {qmlviewer} using the -translation option.
+\section1 Example
+
+First we create a simple QML file with text to be translated. The string
+that needs to be translated is enclosed in a call to \c qsTr().
+
+hello.qml:
+\qml
+import Qt 4.6
+
+Rectangle {
+ width: 200; height: 200
+ Text { text: qsTr("Hello"); anchors.centerIn: parent }
+}
+\endqml
+
+Next we create a translation source file using lupdate:
+\code
+lupdate hello.qml -ts hello.ts
+\endcode
+
+Then we open \c hello.ts in \l {Linguist}, provide a translation
+and create the release file \c hello.qm.
+
+Finally, we can test the translation in qmlviewer:
+\code
+qmlviewer -translation hello.qm hello.qml
+\endcode
*/
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index 762a900..c3c1701 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -103,7 +103,7 @@
<li><a href="paintsystem.html">Painting and Printing</a></li>
<li><a href="graphicsview.html">Canvas UI with Graphics View</a></li>
<li><a href="webintegration.html">Integrating Web Content</a></li>
- <li><a href="declarativeui.html">Declarative UI</a></li>
+ <li><a href="declarativeui.html">Declarative UI (QML)</a></li>
</ul>
</td>
<td valign="top">