diff options
Diffstat (limited to 'src/imports/controls/doc/src')
13 files changed, 125 insertions, 213 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-configuration.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc index 29bfc99c..d03f2325 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc @@ -36,14 +36,15 @@ attributes. The following example specifies that the preferred style is the \l {Material style}. Furthermore, when the application is run with the Material style, its theme is light and the accent and primary colors are teal and blue grey, respectively. However, if the application - is run with the \l {Universal style} instead, the theme is dark and the accent color is red. + is run with the \l {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] diff --git a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc index 71ffe350..866aef23 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 @@ -488,7 +488,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 @@ -503,6 +503,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}. @@ -581,6 +598,12 @@ \snippet qtquickcontrols2-rangeslider-custom.qml file + \section2 Customizing RoundButton + + RoundButton can be customized in the same manner as + \l {Customizing Button}{Button}. + + \section2 Customizing ScrollBar ScrollBar consists of two visual items: \l {Control::background}{background} @@ -723,6 +746,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} @@ -730,7 +763,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 } @@ -747,4 +780,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-differences.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc index 45ea7db7..5cb7a9a5 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc @@ -115,7 +115,7 @@ \row \li Can be used on Desktop \li Yes - \li Yes \b * + \li Yes \row \li Can be used on Mobile \li Yes @@ -130,8 +130,6 @@ \li C++ \endtable - \b {* No hover effects} - \section2 Porting Qt Quick Controls Code The API of Qt Quick Controls 2 is very similar to Qt Quick Controls, but it @@ -262,6 +260,9 @@ \li \l [QML QtQuickControls] {MenuItem} \li \l [QML QtQuickControls2] {MenuItem} \row + \li \l [QML QtQuickControls] {MenuSeparator} + \li \l [QML QtQuickControls2] {MenuSeparator} + \row \li \mdash \li \l [QML QtQuickControls2] {Page} \row @@ -352,6 +353,9 @@ \li \l [QML QtQuickControls2] {ToolButton} \row \li \mdash + \li \l [QML QtQuickControls2] {ToolSeparator} + \row + \li \mdash \li \l [QML QtQuickControls2] {ToolTip} \row \li \l [QML QtQuickControls] {TreeView} 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 cdb20a27..d3f3ec52 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 @@ -85,6 +86,7 @@ \list \li \l{Qt Quick Controls 2 - Gallery}{Gallery} \li \l{Qt Quick Controls 2 - Chat Tutorial}{Chat Tutorial} + \li \l{Qt Quick Controls 2 - Text Editor}{Text Editor} \li \l{Qt Quick Controls 2 Examples}{All Examples} \endlist @@ -95,5 +97,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 9842fee6..d841c46d 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 @@ -89,8 +89,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 @@ -328,6 +328,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. In the following example, the theme for both the pane and the button is set to \c Material.Dark: 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-universal.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc index c0e2daee..104c682f 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 @@ -88,8 +88,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 @@ -241,6 +241,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. In the following example, the theme for both the pane and the button is set to \c Universal.Dark: 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 -*/ |