diff options
Diffstat (limited to 'src/quick/doc')
-rw-r--r-- | src/quick/doc/images/rect-border-width.png | bin | 374 -> 0 bytes | |||
-rw-r--r-- | src/quick/doc/snippets/qml/rectangle/rect-border-width.qml | 59 | ||||
-rw-r--r-- | src/quick/doc/src/appdevguide/porting.qdoc | 2 | ||||
-rw-r--r-- | src/quick/doc/src/appdevguide/qmlscene.qdoc | 219 | ||||
-rw-r--r-- | src/quick/doc/src/qmltypereference.qdoc | 3 | ||||
-rw-r--r-- | src/quick/doc/src/qtquick-cpp.qdoc | 3 | ||||
-rw-r--r-- | src/quick/doc/src/qtquick.qdoc | 5 |
7 files changed, 122 insertions, 169 deletions
diff --git a/src/quick/doc/images/rect-border-width.png b/src/quick/doc/images/rect-border-width.png Binary files differdeleted file mode 100644 index e232cf3ebd..0000000000 --- a/src/quick/doc/images/rect-border-width.png +++ /dev/null diff --git a/src/quick/doc/snippets/qml/rectangle/rect-border-width.qml b/src/quick/doc/snippets/qml/rectangle/rect-border-width.qml deleted file mode 100644 index 9616ca88d1..0000000000 --- a/src/quick/doc/snippets/qml/rectangle/rect-border-width.qml +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 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. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -//![0] -Rectangle { - width: 100; height: 100 - color: "lightblue" - - Rectangle { - anchors.fill: parent - anchors.margins: 10 - clip: true - - Rectangle { - anchors.fill: parent - border.width: 1 - } - } -} -//![0] diff --git a/src/quick/doc/src/appdevguide/porting.qdoc b/src/quick/doc/src/appdevguide/porting.qdoc index 5843800363..3ac13cd255 100644 --- a/src/quick/doc/src/appdevguide/porting.qdoc +++ b/src/quick/doc/src/appdevguide/porting.qdoc @@ -27,7 +27,7 @@ /*! \page qtquick-porting-qt5.html -\title QML Application in Qt 5 +\title QML Applications in Qt 5 \brief Lists the Qt 5.0 changes that affect the existing QML applications When porting QML-related code from Qt 4.8 to Qt 5, application developers should be aware that diff --git a/src/quick/doc/src/appdevguide/qmlscene.qdoc b/src/quick/doc/src/appdevguide/qmlscene.qdoc index 33beba75f8..264adffee3 100644 --- a/src/quick/doc/src/appdevguide/qmlscene.qdoc +++ b/src/quick/doc/src/appdevguide/qmlscene.qdoc @@ -26,110 +26,121 @@ ****************************************************************************/ /*! -\page qtquick-qmlscene.html -\ingroup qtquick-tools -\title Prototyping with qmlscene -\ingroup qttools -\brief a tool for testing and loading QML files - -The Qt SDK includes \c qmlscene, a tool for loading QML documents that -makes it easy to quickly develop and debug QML applications. It provides a simple -way of loading QML documents and also includes additional features useful for -the development of QML applications. - -The \c qmlscene tool should only be used for testing and developing QML applications. It is -\e not intended for use in a production environment and should not be used for the -deployment of QML applications. In those cases, a custom C++ application should be -written instead, or the QML file should be bundled in a module. See -\l {Deploying QML applications} for more information. - -The \c qmlscene tool is located at \c QTDIR/bin/qmlscene. To load a \c .qml file, -run the tool and select the file to be opened, or provide the -file path on the command line: - -\code - qmlscene myqmlfile.qml -\endcode - -To see the configuration options, run \c qmlscene with the \c -help argument. - - -\section1 Adding module import paths - -Additional module import paths can be provided using the \c -I flag. -For example, the \l{declarative/cppextensions/plugins}{QML plugins example} creates -a C++ plugin identified as \c com.nokia.TimeExample. Since this has a namespaced -identifier, \c qmlscene has to be run with the \c -I flag from the example's -base directory: - -\code -qmlscene -I . plugins.qml -\endcode - -This adds the current directory to the import path so that \c qmlscene will -find the plugin in the \c com/nokia/TimeExample directory. - -Note by default, the current directory is included in the import search path, -but namespaced modules like \c com.nokia.TimeExample are not found unless -the path is explicitly added. - - -\section1 Loading placeholder data - -Often, QML applications are prototyped with fake data that is later replaced -by real data sources from C++ plugins. The \c qmlscene tool assists in this aspect by -loading fake data into the application context: it looks for a directory named -"dummydata" in the same directory as the target QML file, and any \c .qml -files in that directory are loaded as QML objects and bound to the root context -as properties named after the files. - -For example, this QML document refers to a \c lottoNumbers property which does -not actually exist within the document: - -\qml -import QtQuick 2.0 - -ListView { - width: 200; height: 300 - model: lottoNumbers - delegate: Text { text: number } -} -\endqml - -If within the document's directory, there is a "dummydata" directory which -contains a \c lottoNumbers.qml file like this: - -\qml -import QtQuick 2.0 - -ListModel { - ListElement { number: 23 } - ListElement { number: 44 } - ListElement { number: 78 } -} -\endqml - -Then this model would be automatically loaded into the ListView in the previous document. - -Child properties are included when loaded from dummy data. The following document -refers to a \c clock.time property: - -\qml -import QtQuick 2.0 -Text { text: clock.time } -\endqml - -The text value could be filled by a \c dummydata/clock.qml file with a \c time -property in the root context: - -\qml -import QtQuick 2.0 -QtObject { property int time: 54321 } -\endqml - -To replace this with real data, you can simply bind the real data object to -the root context in C++ using QQmlContext::setContextProperty(). This -is detailed in \l{qtqml-cppintegration-topic.html}{Integrating QML and C++}. + \page qtquick-qmlscene.html + \ingroup qtquick-tools + \title Prototyping with qmlscene + \ingroup qttools + \brief Utility to test and load QML files + + Qt 5 includes \c qmlscene, a utility to load QML documents. + The \c{qmlscene} utility enables viewing your QML document even before the + application is complete. This utility also provides the following + additional features that are useful while developing QML applications: + \list + \li View the QML document in a maximized window. + \li View the QML document in full-screen mode. + \li Make the window transparent. + \li Disable multi-sampling (anti-aliasing). + \li Do not detect the version of the .qml file. + \li Run all animations in slow motion. + \li Resize the window to the size of the root item. + \li Add the list of import paths. + \li Add a named bundle. + \li Use a translation file to set the language. + \endlist + + The \c qmlscene utility is meant to be used for testing your QML + applications, and not as a launcher in a production environment. + To launch a QML application in a production environment, develop a custom + C++ application or bundle the QML file in a module. See \l {Deploying QML + applications} for more information. + + To load a .qml file, run the tool and select the file to be opened, or + provide the file path on the command prompt: + + \code + qmlscene myqmlfile.qml + \endcode + + To see the configuration options, run \c qmlscene with the \c -help + argument. + + \section1 Adding Module Import Paths + + Additional module import paths can be provided using the \c -I flag. + For example, the \l{QML Plugin Example}{QML plugin example} + creates a C++ plugin identified with the namespace, \c TimeExample. + To load the plugin, you must run \c qmlscene with the \c{-I} flag from the + example's base directory: + + \code + qmlscene -I imports plugins.qml + \endcode + + This adds the current directory to the import path so that \c qmlscene will + find the plugin in the \c imports directory. + + \note By default, the current directory is included in the import search + path, but modules in a namespace such as \c TimeExample are not found + unless the path is explicitly added. + + \section1 Loading Test Data + + Often, QML applications are prototyped with test data that is later + replaced by real data sources from C++ plugins. The \c qmlscene utility + assists in this aspect by loading test data into the application context. + It looks for a directory named \c {dummydata} in the same directory as + the target QML file, and loads the .qml files in that directory as QML + objects and bind them to the root context as properties named after the files. + + For example, the following QML document refers to a \c lottoNumbers + property which does not exist within the document: + + \qml + import QtQuick 2.0 + + ListView { + width: 200; height: 300 + model: lottoNumbers + delegate: Text { text: number } + } + \endqml + + If within the document's directory, there is a \c{dummydata} directory + which contains a \c lottoNumbers.qml file like this: + + \qml + import QtQuick 2.0 + + ListModel { + ListElement { number: 23 } + ListElement { number: 44 } + ListElement { number: 78 } + } + \endqml + + Then this model would be automatically loaded into the ListView in the + previous document. + + Child properties are included when loaded from \c dummydata. The following + document refers to a \c clock.time property: + + \qml + import QtQuick 2.0 + Text { text: clock.time } + \endqml + + The text value could be filled by a \c dummydata/clock.qml file with a + \c time property in the root context: + + \qml + import QtQuick 2.0 + QtObject { property int time: 54321 } + \endqml + + To replace this with real data, bind the real data object to + the root context in C++ using QQmlContext::setContextProperty(). This is + detailed in \l{Integrating QML and C++}. */ diff --git a/src/quick/doc/src/qmltypereference.qdoc b/src/quick/doc/src/qmltypereference.qdoc index e2bb247af8..c0b4968ce3 100644 --- a/src/quick/doc/src/qmltypereference.qdoc +++ b/src/quick/doc/src/qmltypereference.qdoc @@ -27,7 +27,8 @@ /*! \page qtquick-qmltypereference.html -\title QML Types Provided by Qt Quick +\title Qt Quick QML Types +\ingroup qmlmodules \brief Description of the QML types provided by the Qt Quick module The \c QtQuick QML module provides a variety of QML types for creating user diff --git a/src/quick/doc/src/qtquick-cpp.qdoc b/src/quick/doc/src/qtquick-cpp.qdoc index 6fc53c9f13..54a37f62b6 100644 --- a/src/quick/doc/src/qtquick-cpp.qdoc +++ b/src/quick/doc/src/qtquick-cpp.qdoc @@ -26,7 +26,8 @@ ****************************************************************************/ /*! \module QtQuick - \title Qt Quick Module - C++ Classes + \title Qt Quick Module C++ Classes + \ingroup modules \brief The Qt Quick module provides classes for embedding Qt Quick in Qt/C++ applications. diff --git a/src/quick/doc/src/qtquick.qdoc b/src/quick/doc/src/qtquick.qdoc index 5ce289c9e9..1d24e33cc4 100644 --- a/src/quick/doc/src/qtquick.qdoc +++ b/src/quick/doc/src/qtquick.qdoc @@ -39,7 +39,7 @@ visual components, receiving user input, creating data models and views and delayed object instantiation. The Qt Quick module provides both the \c QtQuick QML module, which supplies -\l{QML Types Provided by Qt Quick}{a set of QML types} for creating user +\l{Qt Quick QML Types}{a set of QML types} for creating user interfaces with the QML language, and the \c QtQuick C++ module, which supplies \l{Qt Quick Module - C++ Classes}{a set of C++ APIs} for integrating with user interfaces and applications built with QML and the \c QtQuick QML module. @@ -113,7 +113,7 @@ Additional Qt Quick information: \list \li \l{Qt Quick Module - C++ Classes} - the C++ API provided by the Qt Quick module -\li \l{QML Types Provided by Qt Quick} - a list of QML types provided by the +\li \l{Qt Quick QML Types} - a list of QML types provided by the \c{QtQuick} import \list \li \l{QML Module QtQuick.XmlListModel 2.0}{XML List Model} - contains types @@ -137,4 +137,3 @@ Further information for writing QML applications: Qt QML module, which provides the QML engine and language infrastructure \endlist */ - |