diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-06-20 16:24:08 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-06-20 16:24:08 +0200 |
commit | 84bb67bb2a0ed91110c4034b85cabbae4c4ff238 (patch) | |
tree | 295685fd55e75ac37f8240ff183029b9ed7a8a48 /src/controls | |
parent | dff9daaddcd52079b520c112e58155abe9e9f7f7 (diff) | |
parent | f5f818e3adfa9d39c4955ffe34443027427a7f74 (diff) | |
download | qtquickcontrols-84bb67bb2a0ed91110c4034b85cabbae4c4ff238.tar.gz |
Merge remote-tracking branch 'origin/release' into stable
Change-Id: I08068004ecb6269c032595e86a164705ce9e4f39
Diffstat (limited to 'src/controls')
-rw-r--r-- | src/controls/doc/qtquickcontrols.qdocconf | 2 | ||||
-rw-r--r-- | src/controls/doc/src/qtquickcontrols-index.qdoc | 74 | ||||
-rw-r--r-- | src/controls/doc/src/qtquickcontrols-overview.qdoc | 79 | ||||
-rw-r--r-- | src/controls/qquickstack.cpp | 1 |
4 files changed, 83 insertions, 73 deletions
diff --git a/src/controls/doc/qtquickcontrols.qdocconf b/src/controls/doc/qtquickcontrols.qdocconf index ab321a74..44fd86ca 100644 --- a/src/controls/doc/qtquickcontrols.qdocconf +++ b/src/controls/doc/qtquickcontrols.qdocconf @@ -14,7 +14,7 @@ qhp.QtQuickControls.indexTitle = Qt Quick Controls qhp.QtQuickControls.indexRoot = #qhp.QtQuickControls.extraFiles = style/qtquickcontrols.css -qhp.QtQuickControls.filterAttributes = qtcontrols $QT_VERSION qtrefdoc +qhp.QtQuickControls.filterAttributes = qtquickcontrols $QT_VERSION qtrefdoc qhp.QtQuickControls.customFilters.Qt.name = QtQuickControls $QT_VERSION qhp.QtQuickControls.customFilters.Qt.filterAttributes = qtquickcontrols $QT_VERSION diff --git a/src/controls/doc/src/qtquickcontrols-index.qdoc b/src/controls/doc/src/qtquickcontrols-index.qdoc index 5c22276e..96f2a670 100644 --- a/src/controls/doc/src/qtquickcontrols-index.qdoc +++ b/src/controls/doc/src/qtquickcontrols-index.qdoc @@ -36,56 +36,7 @@ The module is new in Qt 5.1 and requires \l{Qt Quick} 2.1. - \image qtquickcontrols-example-gallery.png - - \section1 Getting Started - - The QML types can be imported into your application using the following import statement in your \c {.qml} file. - - \code - import QtQuick.Controls 1.0 - \endcode - - A basic example of a QML file that makes use of controls is shown here: - - \code - import QtQuick.Controls 1.0 - - ApplicationWindow { - title: "My Application" - - Button { - text: "Push Me" - anchors.centerIn: parent - } - } - \endcode - - \section2 Setting Up Controls from C++ - - While we traditionally have used a QQuickView window to display QML files - in a C++ application, doing this means you can only set window properties from C++. - - With Qt Quick Controls, declare an ApplicationWindow as the root item of your application and launch it by using the - QQmlApplicationEngine instead. This ensures that you can control top level window properties from QML. - - A basic example of a source file that makes use of controls is shown here: - - \code - #include <QApplication> - #include <QQmlApplicationEngine> - - int main(int argc, char *argv[]) - { - QApplication app(argc, argv); - QQmlApplicationEngine engine("main.qml"); - return app.exec(); - } - \endcode - - \note We are using QApplication and not QGuiApplication in this example. - Though you can use QGuiApplication instead, doing this will eliminate platform-dependent styling. - This is because it is relying on the widget module to provide the native look and feel. + Visit the \l{Qt Quick Controls Overview} page to get started. \section1 Application Window Components used to describe the basic window properties of an application. @@ -105,29 +56,12 @@ \section1 Related information - \section2 Guides \list + \li \l{Qt Quick} \li \l{Qt Quick Controls Overview} - \endlist - - \section2 Reference - \list \li \l{Qt Quick Controls QML Types}{Qt Quick Controls QML Types} - \endlist - - \section2 Examples - \list \li \l{Qt Quick Controls Examples} + \li \l{Qt Quick Controls Styles} + \li \l{Qt Quick Layouts} \endlist - - \section2 Styles - \list - \li \l {Qt Quick Controls Styles} - \endlist - - \section2 Layouts - \list - \li \l {Qt Quick Layouts} - \endlist - */ diff --git a/src/controls/doc/src/qtquickcontrols-overview.qdoc b/src/controls/doc/src/qtquickcontrols-overview.qdoc index 82da0b22..4eb6892f 100644 --- a/src/controls/doc/src/qtquickcontrols-overview.qdoc +++ b/src/controls/doc/src/qtquickcontrols-overview.qdoc @@ -28,5 +28,82 @@ /*! \page qtquickcontrols-overview.html \title Qt Quick Controls Overview - \brief A set of APIs for working with ... + \brief A set of UI controls to create user interfaces in Qt Quick + + The Qt Quick Controls provide a set of UI controls to create user interfaces + in Qt Quick. + + \section1 Getting Started + + The QML types can be imported into your application using the following import statement in your \c {.qml} file. + + \code + import QtQuick.Controls 1.0 + \endcode + + \section1 Creating a basic example + + A basic example of a QML file that makes use of controls is shown here: + + \code + import QtQuick.Controls 1.0 + + ApplicationWindow { + title: "My Application" + + Button { + text: "Push Me" + anchors.centerIn: parent + } + } + \endcode + + For an overview of the controls provided by \l{Qt Quick Controls}, you can look at + the \l{Qt Quick Controls - Gallery}{Gallery} example. + + \image qtquickcontrols-example-gallery.png + + \section1 Setting Up Controls from C++ + + Although we have traditionally used a QQuickView window to display QML files + in a C++ application, doing this means you can only set window properties from C++. + + With Qt Quick Controls, declare an ApplicationWindow as the root item of your application and launch it by using the + QQmlApplicationEngine instead. This ensures that you can control top level window properties from QML. + + A basic example of a source file that makes use of controls is shown here: + + \code + #include <QApplication> + #include <QQmlApplicationEngine> + + int main(int argc, char *argv[]) + { + QApplication app(argc, argv); + QQmlApplicationEngine engine("main.qml"); + return app.exec(); + } + \endcode + + \note We are using QApplication and not QGuiApplication in this example. + Though you can use QGuiApplication instead, doing this will eliminate platform-dependent styling. + This is because it is relying on the widget module to provide the native look and feel. + + \section2 Using C++ Data From QML + + If you need to register a C++ class to use from QML, you can call, for example, + qmlRegisterType() before declaring your QQmlApplicationEngine. You can find the list + of all registering functions \l{QQmlEngine}{here}. + + If you need to expose data to QML components, you need to set them + to the context of the current QML engine. See QQmlContext for more + information. + + \section1 Related information + + \list + \li \l{Qt Quick} + \li \l{Qt Quick Controls} + \li \l{Qt Quick Controls Examples} + \endlist */ diff --git a/src/controls/qquickstack.cpp b/src/controls/qquickstack.cpp index ecf873d7..c949ffeb 100644 --- a/src/controls/qquickstack.cpp +++ b/src/controls/qquickstack.cpp @@ -47,7 +47,6 @@ QT_BEGIN_NAMESPACE \qmltype Stack \instantiates QQuickStack \inqmlmodule QtQuick.Controls 1.0 - \ingroup views \brief Provides attached properties for items pushed onto a StackView. The Stack type provides attached properties for items pushed onto a \l StackView. |