aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/window/doc/src
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@digia.com>2014-05-28 16:19:08 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-06-05 12:02:01 +0200
commit5f99a6388abf87c34e052f3d7e266c48852a52dd (patch)
treeb88dc0b9dc36c477d6716edf932eb328d413ad68 /examples/quick/window/doc/src
parentc9553ad7d8041c7b0fd769dc8cd0f5335d9408a3 (diff)
Doc: Updated "Qt Quick Examples" pages.
-added instructions about running the example (using \include) -used the example names as sections in the collection pages -general editing and documentation polishing -updated copyright information Change-Id: I044f29fcc1921a541040505d5821acb06dc4cb35 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'examples/quick/window/doc/src')
-rw-r--r--examples/quick/window/doc/src/window.qdoc59
1 files changed, 38 insertions, 21 deletions
diff --git a/examples/quick/window/doc/src/window.qdoc b/examples/quick/window/doc/src/window.qdoc
index 07d2f115c1..7725f39a46 100644
--- a/examples/quick/window/doc/src/window.qdoc
+++ b/examples/quick/window/doc/src/window.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the documentation of the Qt Toolkit.
@@ -31,22 +31,35 @@
\image qml-window-example.png
\ingroup qtquickexamples
- This example shows you how to create a Window in QML, how to control its
- \l {QQuickWindow::visibility} {visibility}, how to present a splash screen
- during application startup, and how to access the properties of the
- \l Screen. It also demonstrates how to package QML into
- \l {The Qt Resource System} {resources} and provide an
- \l {Setting the Application Icon} {icon} to create a standalone QML desktop application.
+ \e{Window and Screen} shows how to:
+
+ \list
+ \li create a window in QML
+ \li control its \l {QQuickWindow::visibility} {visibility}
+ \li present a splash screen during application startup
+ \li access the properties of the \l Screen
+ \endlist
+
+ It also demonstrates how to package QML into \l {The Qt Resource System}
+ {resources} and provide an \l {Setting the Application Icon} {icon} to
+ create a standalone QML desktop application.
+
+ \include examples-run.qdocinc
+
+ \section1 Window Implementation
+
+ A splash screen can be created with the \l {Qt::SplashScreen}
+ {Qt.SplashScreen} flag, and should be \l {Qt::ApplicationModal}
+ {ApplicationModal} to prevent interaction with the main window. If the
+ splash window is also transparent, and showing a partially transparent
+ image, then it will look like a shaped window.
- A splash screen can be created with the \l {Qt::SplashScreen} {Qt.SplashScreen} flag,
- and should be \l {Qt::ApplicationModal} {ApplicationModal} to prevent interaction
- with the main window. If the splash window is also transparent, and showing a
- partially transparent image, then it will look like a shaped window.
\snippet window/Splash.qml splash-properties
In this example a \l Timer will automatically dismiss the splash screen,
but in a real application you might want to connect to a signal from the
application logic to hide the splash when initialization is complete.
+
\snippet window/Splash.qml timer
The main window in this example is the control window, with some buttons
@@ -54,18 +67,22 @@
window. Each checkbox has a binding to the property whose state it is
displaying, and also an onClicked handler to change the state. This is the
typical pattern to create a two-way binding while avoiding binding loops.
+
\snippet window/window.qml windowedCheckbox
- The \l Screen has several properties which are generally useful to applications
- which need to rotate some content when the screen orientation changes, to position
- windows on the screen or to convert real units to logical pixel units. ScreenInfo.qml
- (which is displayed inline in window.qml, or can be run by itself with qmlscene)
- simply displays the property values, while the splash screen uses them to
- center the window on the screen.
+ \l Screen has several properties which are generally useful to
+ applications which need to rotate some content when the screen orientation
+ changes, to position windows on the screen or to convert real units to
+ logical pixel units. ScreenInfo.qml (which is displayed inline in
+ window.qml, or can be run by itself with qmlscene) simply displays the
+ property values, while the splash screen uses them to center the window on
+ the screen.
+
\snippet window/Splash.qml screen-properties
- If a Window is nested inside an \l Item or another Window, the inner window
- becomes "transient for" the outer one (see \l Window for more explanation).
- But if you want to create multiple top-level windows as unrelated peers, you
- can create them inside a non-visual \l QtObject root item, as this example does.
+ If a \l Window is nested inside an \l Item or another Window, the inner
+ window becomes \e{transient for} the outer one (see \l Window for more
+ explanation). But if you want to create multiple top-level windows as
+ unrelated peers, you can create them inside a non-visual \l QtObject root
+ item, as this example does.
*/