aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc/src/appdevguide/usecases/layouts.qdoc
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2012-07-19 11:05:05 +1000
committerQt by Nokia <qt-info@nokia.com>2012-08-08 10:50:52 +0200
commit3704f1f0b25aee9e7c903368202ccf7dc16d9107 (patch)
treec44762ec24a0a351f401bdf1f4e43c7dde18c396 /src/quick/doc/src/appdevguide/usecases/layouts.qdoc
parent6ebf215fdaf2d757ab90ae4d46c4b938e978e2dc (diff)
Provide features/use-case docs in QML AppDevGuide
The most common use-cases should have easily-accessible solutions available from the front-page of the QML application developer guide. This commit adds that documentation. Task-number: QTBUG-26428 Change-Id: Id15e76db15fbe3599e9ac5dd98e74ad4e034ece4 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'src/quick/doc/src/appdevguide/usecases/layouts.qdoc')
-rw-r--r--src/quick/doc/src/appdevguide/usecases/layouts.qdoc36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/quick/doc/src/appdevguide/usecases/layouts.qdoc b/src/quick/doc/src/appdevguide/usecases/layouts.qdoc
index a32b8b527f..cf059e9186 100644
--- a/src/quick/doc/src/appdevguide/usecases/layouts.qdoc
+++ b/src/quick/doc/src/appdevguide/usecases/layouts.qdoc
@@ -28,4 +28,40 @@
\page qtquick-usecase-layouts.html
\title Use Case - Layouts In QML
\brief Example of how to create layouts for visual elements in a QML application
+
+There are several ways to position items in QML, including simple property bindings.
+
+\section1 Manual Positioning
+
+Items can be placed at specific x,y coordinates on the screen by setting their x,y properties. This will setup their
+position relative to the top left corner of their parent, for more detail see \c {Visual Canvas}.
+
+Combined with using bindings instead of constant valudes for these properties, relative positioning is also easily
+accomplished by setting the x and y coordinates to the appropriate bindings.
+
+\snippet qml/usecases/layouts.qml direct
+
+\section1 Anchors
+
+The \c Item type provides the abilitiy to anchor to other Item types. There are six anchor lines for each item: left,
+right, vertical center, top, bottom and horizontal center. The three vertical anchor lines can be anchored to any of
+the three vertical anchor lines of another item, and the three horizontal anchor lines can be anchored to the
+horizontal anchor lines of another item.
+
+For full details, see the documentation of the \l{Item::anchors}{anchors property}.
+
+\snippet qml/usecases/layouts.qml anchors
+
+\section1 Positioners
+
+For the common case of wanting to position a set of elements in a regular pattern, QtQuick provides some Positioner
+types. Items placed in a positioner are automatically positioned in some way, for example a Row positions items to be
+horizontally adjacent (forming a row).
+
+For full details see the documentation for \l{qtquick-qmltypereference.html#positioning}{the positioner types}.
+
+\snippet qml/usecases/layouts.qml positioners
+
+\image qml-uses-layouts.png
+
*/