aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/doc/src')
-rw-r--r--src/imports/controls/doc/src/calendar/qtlabscalendar-index.qdoc51
-rw-r--r--src/imports/controls/doc/src/calendar/qtlabscalendar.qdoc58
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc48
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-fileselectors.qdoc8
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-gettingstarted.qdoc17
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-index.qdoc6
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-material.qdoc17
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc4
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-separators.qdoc (renamed from src/imports/controls/doc/src/templates/qtquicktemplates2.qdoc)48
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc21
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc17
-rw-r--r--src/imports/controls/doc/src/templates/qtquicktemplates2-index.qdoc54
12 files changed, 120 insertions, 229 deletions
diff --git a/src/imports/controls/doc/src/calendar/qtlabscalendar-index.qdoc b/src/imports/controls/doc/src/calendar/qtlabscalendar-index.qdoc
deleted file mode 100644
index d99b3880..00000000
--- a/src/imports/controls/doc/src/calendar/qtlabscalendar-index.qdoc
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page qtlabscalendar-index.html
- \title Qt Labs Calendar
-
- \brief The Qt Labs Calendar module provides a set of UI controls for Qt
- Quick.
-
- The Qt Labs Calendar module provides a set of types that can be used
- to build calendars in Qt Quick.
-
- \section1 QML Types
-
- \generatelist {qmltypesbymodule Qt.labs.calendar}
-
- \labs
-
- \section1 Related Information
-
- \list
- \li \l{Qt Quick}
- \li \l{Qt Quick Layouts}
- \li \l{Qt Quick Controls 2}
- \endlist
-*/
diff --git a/src/imports/controls/doc/src/calendar/qtlabscalendar.qdoc b/src/imports/controls/doc/src/calendar/qtlabscalendar.qdoc
deleted file mode 100644
index a94e5ec6..00000000
--- a/src/imports/controls/doc/src/calendar/qtlabscalendar.qdoc
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \qmlmodule Qt.labs.calendar 1.0
- \title Qt Labs Calendar QML Types
- \ingroup qmlmodules
- \brief Provides QML types for calendars (Qt Labs Calendar).
-
- The \l{Qt Labs Calendar} module provides QML types for creating
- calendars. These QML types work in conjunction with \l{Qt Quick} and
- \l{Qt Quick Controls 2}.
-
- The QML types can be imported into your application using the
- following import statement in your .qml file:
-
- \badcode
- import Qt.labs.calendar 1.0
- \endcode
-
- \section1 QML Types
-
- \generatelist {qmltypesbymodule Qt.labs.calendar}
-
- \labs
-
- \section1 Related Information
-
- \list
- \li \l {Qt Quick Controls 2 QML Types}
- \endlist
-
- \noautolist
-*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
index 559c89f0..d98b70d1 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
@@ -49,7 +49,7 @@
\qml
import QtQuick 2.6
- import QtQuick.Controls 2.0
+ import QtQuick.Controls 2.1
ApplicationWindow {
width: 400
@@ -92,7 +92,7 @@
your application, refer to it by its filename:
\qml
- import QtQuick.Controls 2.0
+ import QtQuick.Controls 2.1
ApplicationWindow {
MyButton {
@@ -108,7 +108,7 @@
control, first import the folder into a namespace:
\qml
- import QtQuick.Controls 2.0
+ import QtQuick.Controls 2.1
import "controls" as MyControls
ApplicationWindow {
@@ -299,7 +299,7 @@
\qml
import QtQuick 2.6
- import QtQuick.Controls 2.0
+ import QtQuick.Controls 2.1
import MyStyle 1.0
@@ -456,7 +456,7 @@
\quotefromfile qtquickcontrols2-menu-custom.qml
\skipto import QtQuick 2.6
- \printuntil import QtQuick.Controls 2.0
+ \printuntil import QtQuick.Controls 2.1
\skipto Menu
\printto contentItem.parent: window
\skipline contentItem.parent: window
@@ -471,6 +471,23 @@
\l {Customizing Button}{Button}.
+ \section2 Customizing MenuSeparator
+
+ MenuSeparator consists of two visual items: \l {Control::background}{background}
+ and \l {Control::contentItem}{content item}.
+
+ \image qtquickcontrols2-menuseparator-custom.png
+
+ \quotefromfile qtquickcontrols2-menuseparator-custom.qml
+ \skipto import QtQuick 2.6
+ \printuntil import QtQuick.Controls 2.1
+ \skipto Menu
+ \printto contentItem.parent: window
+ \skipline contentItem.parent: window
+ \printuntil text: qsTr("Exit")
+ \printuntil }
+ \printuntil }
+
\section2 Customizing PageIndicator
PageIndicator consists of a \l {Control::background}{background}, \l {Control::contentItem}{content item}, and \l {PageIndicator::delegate}{delegate}.
@@ -673,6 +690,16 @@
\snippet qtquickcontrols2-toolbutton-custom.qml file
+ \section2 Customizing ToolSeparator
+
+ ToolSeparator consists of two visual items: \l {Control::background}{background}
+ and \l {Control::contentItem}{content item}.
+
+ \image qtquickcontrols2-toolseparator-custom.png
+
+ \snippet qtquickcontrols2-toolseparator-custom.qml file
+
+
\section2 Customizing ToolTip
ToolTip consists of two visual items: \l {Popup::background}{background}
@@ -680,7 +707,7 @@
\quotefromfile qtquickcontrols2-tooltip-custom.qml
\skipto import QtQuick 2.6
- \printuntil import QtQuick.Controls 2.0
+ \printuntil import QtQuick.Controls 2.1
\skipto ToolTip
\printuntil }
\printuntil }
@@ -697,4 +724,13 @@
\image qtquickcontrols2-tumbler-custom.png
\snippet qtquickcontrols2-tumbler-custom.qml file
+
+ If you want to define your own contentItem, use either a \l ListView or
+ \l PathView as the root item. For a wrapping Tumbler, use PathView:
+
+ \snippet qtquickcontrols2-tumbler-pathView.qml contentItem
+
+ For a non-wrapping Tumbler, use ListView:
+
+ \snippet qtquickcontrols2-tumbler-listView.qml contentItem
*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-fileselectors.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-fileselectors.qdoc
index 86df60c7..a132c6f0 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-fileselectors.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-fileselectors.qdoc
@@ -62,7 +62,7 @@
\code
// main.qml
import QtQuick 2.6
- import QtQuick.Controls 2.0
+ import QtQuick.Controls 2.1
ApplicationWindow {
id: window
@@ -81,7 +81,7 @@
\code
// CustomButton.qml
import QtQuick 2.6
- import QtQuick.Controls 2.0
+ import QtQuick.Controls 2.1
Button {
id: control
@@ -103,8 +103,8 @@
// +material/CustomButton.qml
import QtQuick 2.6
import QtGraphicalEffects 1.0
- import QtQuick.Controls 2.0
- import QtQuick.Controls.Material 2.0
+ import QtQuick.Controls 2.1
+ import QtQuick.Controls.Material 2.1
Button {
id: control
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-gettingstarted.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-gettingstarted.qdoc
index 4661e8c9..7eb9eaf4 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-gettingstarted.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-gettingstarted.qdoc
@@ -31,7 +31,22 @@
A basic example of a QML file that makes use of controls is shown here:
- \snippet basic-example.qml 0
+ \qml
+ import QtQuick 2.6
+ import QtQuick.Controls 2.1
+
+ ApplicationWindow {
+ title: "My Application"
+ width: 640
+ height: 480
+ visible: true
+
+ Button {
+ text: "Push Me"
+ anchors.centerIn: parent
+ }
+ }
+ \endqml
\section1 Setting Up Controls from C++
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
index 171239ce..1155032b 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
@@ -32,7 +32,8 @@
\brief Provides a set of UI controls for Qt Quick.
Qt Quick Controls 2 provides a set of controls that can be used
- to build complete interfaces in Qt Quick.
+ to build complete interfaces in Qt Quick. The module was introduced
+ in Qt 5.7.
\section1 Prerequisites
@@ -40,7 +41,7 @@
application using the following import statement in your \c {.qml} file:
\code
- import QtQuick.Controls 2.0
+ import QtQuick.Controls 2.1
\endcode
The \l{Qt Quick Controls 2 C++ Classes}{C++ classes} can be included into
@@ -91,5 +92,6 @@
\li \l{Qt Quick Layouts}
\li \l{Qt Quick Templates 2}
\li \l{Qt Labs Calendar}
+ \li \l{Qt Labs Platform}
\endlist
*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc
index 9416a505..74a7ece1 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc
@@ -32,7 +32,7 @@
The Material Style is based on the Google Material Design Guidelines.
\l{detailed-desc-material}{More...}
- \styleimport {QtQuick.Controls.Material 2.0} {Qt 5.7}
+ \styleimport {QtQuick.Controls.Material 2.1} {Qt 5.7}
\section1 Attached Properties
@@ -85,8 +85,8 @@
\li
\qml
import QtQuick 2.0
- import QtQuick.Controls 2.0
- import QtQuick.Controls.Material 2.0
+ import QtQuick.Controls 2.1
+ import QtQuick.Controls.Material 2.1
Button {
text: "Stop"
@@ -110,8 +110,8 @@
\li
\qml
import QtQuick 2.0
- import QtQuick.Controls 2.0
- import QtQuick.Controls.Material 2.0
+ import QtQuick.Controls 2.1
+ import QtQuick.Controls.Material 2.1
ApplicationWindow {
visible: true
@@ -310,6 +310,11 @@
Available themes:
\value Material.Light Light theme (default)
\value Material.Dark Dark theme
+ \value Material.System System theme
+
+ Setting the theme to \c System chooses either the light or dark theme based
+ on the system theme colors. However, when reading the value of the theme
+ property, the value is never \c System, but the actual theme.
\endstyleproperty
@@ -323,7 +328,7 @@
\qml
import QtQuick 2.0
- import QtQuick.Controls.Material 2.0
+ import QtQuick.Controls.Material 2.1
Rectangle {
color: Material.color(Material.Red)
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc
index 52da41a7..2add71b2 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \qmlmodule QtQuick.Controls 2.0
+ \qmlmodule QtQuick.Controls 2.1
\title Qt Quick Controls 2 QML Types
\ingroup qmlmodules
\brief Provides QML types for user interfaces (Qt Quick Controls 2).
@@ -39,7 +39,7 @@
using the following import statement in your .qml file:
\badcode
- import QtQuick.Controls 2.0
+ import QtQuick.Controls 2.1
\endcode
\section1 QML Types
diff --git a/src/imports/controls/doc/src/templates/qtquicktemplates2.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-separators.qdoc
index 1ddfe763..c4ef1c76 100644
--- a/src/imports/controls/doc/src/templates/qtquicktemplates2.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-separators.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -26,38 +26,38 @@
****************************************************************************/
/*!
- \qmlmodule QtQuick.Templates 2.0
- \title Qt Quick Templates 2 QML Types
- \ingroup qmlmodules
- \brief Provides QML types for templates (Qt Quick Templates).
+ \page qtquickcontrols2-separators.html
+ \title Separator Controls
+ \ingroup qtquickcontrols2-guidelines
+ \brief Guidelines for separator controls
- The \l {Qt Quick Templates 2} module provides a set of non-visual templates
- that can be used to build user interface controls in QML using \l {Qt Quick}.
+ Qt Quick Controls 2 offers a selection of separators.
- The QML types can be imported using the following import statement in your
- \c .qml file:
+ \annotatedlist qtquickcontrols2-separators
- \badcode
- import QtQuick.Templates 2.0 as T
- \endcode
+ Each type of separator has its own specific use case. The following
+ sections offer guidelines for choosing the appropriate type of separator,
+ depending on the use case.
- For the sake of clarity, there is a one-to-one mapping between the types
- provided by the \c QtQuick.Templates and \c QtQuick.Controls imports. For
- every type available in the \c QtQuick.Controls import, a non-visual template
- type by the same name exists in the \c QtQuick.Templates import.
+ \section1 MenuSeparator Control
- \note It is recommended to use a namespace for the templates import to avoid
- overlap with the types provided by the \c QtQuick.Controls import.
+ \image qtquickcontrols2-menuseparator.png
- \section1 QML Types
+ \l MenuSeparator should be used to separate items (typically MenuItem
+ controls) in a Menu. Grouping related menu items together makes it easier
+ for the user to interact with the menu. For example, a typical desktop
+ user interface might have \c Undo and \c Redo items in one group, and
+ \c Cut, \c Copy and \c Paste in another.
- \generatelist {qmltypesbymodule QtQuick.Controls}
+ \section1 ToolSeparator Control
- \section1 Related Information
+ \image qtquickcontrols2-toolseparator.png
+
+ \l ToolSeparator should be used to separate items (typically ToolButton
+ controls) in a ToolBar. It can be used in horizontal or vertical toolbars.
+ \section1 Related Information
\list
- \li \l {Qt Quick Controls 2 QML Types}
+ \li \l {Qt Quick Controls 2 Guidelines}
\endlist
-
- \noautolist
*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc
index 1ad0c228..1a1b7b3c 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc
@@ -136,15 +136,15 @@
of the methods described earlier) and certain style-specific attributes. The following
example specifies that the preferred style is the Material style. Furthermore, when the
application is run with the Material style, its theme is light and the accent color is
- brown. However, if the application is run with the Universal style instead, the theme
- is dark and the accent color is red.
+ brown. However, if the application is run with the Universal style instead, the accent
+ color is red and the appropriate theme is chosen based on the system theme colors.
\code
[Controls]
Style=Material
[Universal]
- Theme=Dark
+ Theme=System
Accent=Red
[Material]
@@ -154,25 +154,16 @@
In order to make it possible for Qt Quick Controls 2 to find the configuration file,
it must be built into application's resources using the \l {The Qt Resource System}.
- Here's an example \c .qrc file:
-
- \code
- <!DOCTYPE RCC><RCC version="1.0">
- <qresource prefix="/">
- <file>qtquickcontrols2.conf</file>
- </qresource>
- </RCC>
- \endcode
\note Qt Quick Controls 2 uses a file selector to load the configuration file. It
is possible to provide a different configuration file for different platforms and
locales. See \l QFileSelector documentation for more details.
- Finally, the \c .qrc file must be listed in the application's \c .pro file so that
- the build system knows about it. For example:
+ Finally, the configuration file must be listed in the application's \c .pro file so
+ that the build system knows about it. For example:
\code
- RESOURCES = application.qrc
+ RESOURCES += qtquickcontrols2.conf
\endcode
\section1 Related Information
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc
index 2e9a7c60..cb6ac17e 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc
@@ -32,7 +32,7 @@
The Universal Style is based on the Microsoft Universal Design Guidelines.
\l {detailed-desc-universal}{More...}
- \styleimport {QtQuick.Controls.Universal 2.0} {Qt 5.7}
+ \styleimport {QtQuick.Controls.Universal 2.1} {Qt 5.7}
\section1 Attached Properties
@@ -85,8 +85,8 @@
\li
\qml
import QtQuick 2.0
- import QtQuick.Controls 2.0
- import QtQuick.Controls.Universal 2.0
+ import QtQuick.Controls 2.1
+ import QtQuick.Controls.Universal 2.1
Button {
text: "Stop"
@@ -110,8 +110,8 @@
\li
\qml
import QtQuick 2.0
- import QtQuick.Controls 2.0
- import QtQuick.Controls.Universal 2.0
+ import QtQuick.Controls 2.1
+ import QtQuick.Controls.Universal 2.1
ApplicationWindow {
visible: true
@@ -229,6 +229,11 @@
Available themes:
\value Universal.Light Light theme (default)
\value Universal.Dark Dark theme
+ \value Universal.System System theme
+
+ Setting the theme to \c System chooses either the light or dark theme based
+ on the system theme colors. However, when reading the value of the theme
+ property, the value is never \c System, but the actual theme.
\endstyleproperty
@@ -241,7 +246,7 @@
\qml
import QtQuick 2.0
- import QtQuick.Controls.Universal 2.0
+ import QtQuick.Controls.Universal 2.1
Rectangle {
color: Universal.color(Universal.Red)
diff --git a/src/imports/controls/doc/src/templates/qtquicktemplates2-index.qdoc b/src/imports/controls/doc/src/templates/qtquicktemplates2-index.qdoc
deleted file mode 100644
index 2e22196b..00000000
--- a/src/imports/controls/doc/src/templates/qtquicktemplates2-index.qdoc
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page qtquicktemplates2-index.html
- \title Qt Quick Templates 2
- \brief A set of templates to create user interface controls in Qt Quick
-
- Qt Quick Templates are the foundations of \l {Qt Quick Controls 2}. Templates
- are non-visual implementations of controls' logic and behavior. They offer
- an interface to visualize the controls in QML using \l {Qt Quick}.
-
- Even though the templates aim to be as style-agnostic as possible, in some
- cases they have to make certain assumptions about the visual structure of
- a control. For example, a spinbox has buttons that increment and decrement
- the value of the spinbox. In order to implement the behavior of a spinbox,
- the spinbox template needs to know if the user is interacting with the up
- or down button. A visual implementation of the spinbox template merely needs
- to position the up and down buttons and visualize them in normal, pressed,
- and disabled states. Any input event handling and state processing is taken
- care of by the underlying template.
-
- \section1 Related Information
-
- \list
- \li \l{Qt Quick}
- \li \l{Qt Quick Controls 2}
- \li \l{Qt Quick Templates 2 QML Types}
- \endlist
-*/