diff options
Diffstat (limited to 'src/quickcontrols/doc')
185 files changed, 1082 insertions, 401 deletions
diff --git a/src/quickcontrols/doc/images/qtquickcontrols-basic-popup-property-propagation.png b/src/quickcontrols/doc/images/qtquickcontrols-basic-popup-property-propagation.png Binary files differnew file mode 100644 index 0000000000..a38e38d915 --- /dev/null +++ b/src/quickcontrols/doc/images/qtquickcontrols-basic-popup-property-propagation.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-basic-thumbnail.png b/src/quickcontrols/doc/images/qtquickcontrols-basic-thumbnail.png Binary files differdeleted file mode 100644 index e971a7aaec..0000000000 --- a/src/quickcontrols/doc/images/qtquickcontrols-basic-thumbnail.png +++ /dev/null diff --git a/src/quickcontrols/doc/images/qtquickcontrols-basic.png b/src/quickcontrols/doc/images/qtquickcontrols-basic.png Binary files differindex 099db17038..2348d3f280 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-basic.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-basic.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-fusion-dark.png b/src/quickcontrols/doc/images/qtquickcontrols-fusion-dark.png Binary files differnew file mode 100644 index 0000000000..4e3f72e2b6 --- /dev/null +++ b/src/quickcontrols/doc/images/qtquickcontrols-fusion-dark.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-fusion-light.png b/src/quickcontrols/doc/images/qtquickcontrols-fusion-light.png Binary files differnew file mode 100644 index 0000000000..44403c6786 --- /dev/null +++ b/src/quickcontrols/doc/images/qtquickcontrols-fusion-light.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-fusion-thumbnail.png b/src/quickcontrols/doc/images/qtquickcontrols-fusion-thumbnail.png Binary files differdeleted file mode 100644 index c270c6efba..0000000000 --- a/src/quickcontrols/doc/images/qtquickcontrols-fusion-thumbnail.png +++ /dev/null diff --git a/src/quickcontrols/doc/images/qtquickcontrols-imagine-thumbnail.png b/src/quickcontrols/doc/images/qtquickcontrols-imagine-thumbnail.png Binary files differdeleted file mode 100644 index ecf2bb163d..0000000000 --- a/src/quickcontrols/doc/images/qtquickcontrols-imagine-thumbnail.png +++ /dev/null diff --git a/src/quickcontrols/doc/images/qtquickcontrols-imagine.png b/src/quickcontrols/doc/images/qtquickcontrols-imagine.png Binary files differindex ffe2c267b2..4e928b7a6a 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-imagine.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-imagine.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-ios-dark.png b/src/quickcontrols/doc/images/qtquickcontrols-ios-dark.png Binary files differindex fd4609c729..bfa014aee9 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-ios-dark.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-ios-dark.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-ios-light.png b/src/quickcontrols/doc/images/qtquickcontrols-ios-light.png Binary files differindex f990078ddf..5a3e868274 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-ios-light.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-ios-light.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-macos-dark.png b/src/quickcontrols/doc/images/qtquickcontrols-macos-dark.png Binary files differindex 97d8a5a4e7..b639221e9b 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-macos-dark.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-macos-dark.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-macos-light.png b/src/quickcontrols/doc/images/qtquickcontrols-macos-light.png Binary files differindex 4a598ad498..653aefc3ed 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-macos-light.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-macos-light.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-macos-thumbnail.png b/src/quickcontrols/doc/images/qtquickcontrols-macos-thumbnail.png Binary files differdeleted file mode 100644 index 57fd98d63a..0000000000 --- a/src/quickcontrols/doc/images/qtquickcontrols-macos-thumbnail.png +++ /dev/null diff --git a/src/quickcontrols/doc/images/qtquickcontrols-material-accent.png b/src/quickcontrols/doc/images/qtquickcontrols-material-accent.png Binary files differindex a85afc68ed..e058fc81f4 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-material-accent.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-material-accent.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-material-attributes.png b/src/quickcontrols/doc/images/qtquickcontrols-material-attributes.png Binary files differindex bb54071d79..60362a94aa 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-material-attributes.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-material-attributes.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-material-background.png b/src/quickcontrols/doc/images/qtquickcontrols-material-background.png Binary files differindex 62028f523c..376bd2ef05 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-material-background.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-material-background.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-material-dark.png b/src/quickcontrols/doc/images/qtquickcontrols-material-dark.png Binary files differindex f6e45b3b1c..3a24d4424a 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-material-dark.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-material-dark.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-material-elevation.png b/src/quickcontrols/doc/images/qtquickcontrols-material-elevation.png Binary files differindex d152f14529..be72fa0da8 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-material-elevation.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-material-elevation.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-material-foreground.png b/src/quickcontrols/doc/images/qtquickcontrols-material-foreground.png Binary files differindex 0d0e1b651a..e7564dee84 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-material-foreground.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-material-foreground.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-material-light.png b/src/quickcontrols/doc/images/qtquickcontrols-material-light.png Binary files differindex c9abe2cb8b..a51ae9ecb0 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-material-light.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-material-light.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-material-theme.png b/src/quickcontrols/doc/images/qtquickcontrols-material-theme.png Binary files differindex 1d09a82580..79bd1899ec 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-material-theme.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-material-theme.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-material-thumbnail.png b/src/quickcontrols/doc/images/qtquickcontrols-material-thumbnail.png Binary files differdeleted file mode 100644 index d758ff1803..0000000000 --- a/src/quickcontrols/doc/images/qtquickcontrols-material-thumbnail.png +++ /dev/null diff --git a/src/quickcontrols/doc/images/qtquickcontrols-material-variant-dense.png b/src/quickcontrols/doc/images/qtquickcontrols-material-variant-dense.png Binary files differindex 02f39b7885..314e1338ce 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-material-variant-dense.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-material-variant-dense.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-material-variant-normal.png b/src/quickcontrols/doc/images/qtquickcontrols-material-variant-normal.png Binary files differindex c1e366c531..2263b72b11 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-material-variant-normal.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-material-variant-normal.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-menu-native.png b/src/quickcontrols/doc/images/qtquickcontrols-menu-native.png Binary files differnew file mode 100644 index 0000000000..b7812bf31f --- /dev/null +++ b/src/quickcontrols/doc/images/qtquickcontrols-menu-native.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-menu.png b/src/quickcontrols/doc/images/qtquickcontrols-menu.png Binary files differindex 926c33eed2..11f69cf5e5 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-menu.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-menu.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-universal-dark.png b/src/quickcontrols/doc/images/qtquickcontrols-universal-dark.png Binary files differindex 952651dca0..85b3e70db7 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-universal-dark.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-universal-dark.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-universal-light.png b/src/quickcontrols/doc/images/qtquickcontrols-universal-light.png Binary files differindex e65447a4c5..fa9375903f 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-universal-light.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-universal-light.png diff --git a/src/quickcontrols/doc/images/qtquickcontrols-universal-thumbnail.png b/src/quickcontrols/doc/images/qtquickcontrols-universal-thumbnail.png Binary files differdeleted file mode 100644 index db7fe5b076..0000000000 --- a/src/quickcontrols/doc/images/qtquickcontrols-universal-thumbnail.png +++ /dev/null diff --git a/src/quickcontrols/doc/images/qtquickcontrols-windows-thumbnail.png b/src/quickcontrols/doc/images/qtquickcontrols-windows-thumbnail.png Binary files differdeleted file mode 100644 index 15408d3bba..0000000000 --- a/src/quickcontrols/doc/images/qtquickcontrols-windows-thumbnail.png +++ /dev/null diff --git a/src/quickcontrols/doc/images/qtquickcontrols-windows.png b/src/quickcontrols/doc/images/qtquickcontrols-windows.png Binary files differindex 324a03412d..c0adcd5549 100644 --- a/src/quickcontrols/doc/images/qtquickcontrols-windows.png +++ b/src/quickcontrols/doc/images/qtquickcontrols-windows.png diff --git a/src/quickcontrols/doc/qtquickcontrols.qdocconf b/src/quickcontrols/doc/qtquickcontrols.qdocconf index a8f050bce7..8c5481bd98 100644 --- a/src/quickcontrols/doc/qtquickcontrols.qdocconf +++ b/src/quickcontrols/doc/qtquickcontrols.qdocconf @@ -1,5 +1,5 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) -include($QT_INSTALL_DOCS/config/exampleurl-qtquickcontrols.qdocconf) +include($QT_INSTALL_DOCS/config/exampleurl-qtquickcontrols2.qdocconf) include(manifest-meta.qdocconf) moduleheader = QtQuickControls2 @@ -29,7 +29,7 @@ qhp.QtQuickControls.subprojects.examples.title = Examples qhp.QtQuickControls.subprojects.examples.indexTitle = Qt Quick Controls Examples qhp.QtQuickControls.subprojects.examples.selectors = fake:example -depends = qtcore qtgui qtdoc qtqml qtqmlmodels qtquick qtsql qtwidgets qtlabsplatform qmake qtcmake +depends = qtcore qtgui qtdoc qtqml qtqmlmodels qtquick qtquickdialogs qtsql qtwidgets qtlabsplatform qmake qtcmake qtvirtualkeyboard # Specify the install path under QT_INSTALL_EXAMPLES # Note: paths passed to \example command must contain the parent directory, e.g. @@ -39,7 +39,7 @@ exampledirs += ../../../examples/quickcontrols \ ../ \ snippets -examples.fileextensions += "*.conf" +examples.fileextensions += "*.conf *.theme" examplesinstallpath = quickcontrols @@ -66,39 +66,51 @@ tagfile = qtquickcontrols.tags # \styleimport {QtQuick.Controls.Universal 2.0} macro.styleimport.HTML = "<table class=\"alignedsummary\"><tbody><tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> import \1</td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Since:</td><td class=\"memItemRight bottomAlign\"> \2</td></tr></tbody></table>" +macro.styleimport.DocBook = "<db:variablelist><db:varlistentry><db:term>Import Statement</db:term><db:listitem><db:para>import \1</db:para></db:listitem></db:varlistentry><db:varlistentry><db:term>Since</db:term><db:listitem><db:para>\2</db:para></db:listitem></db:varlistentry></db:variablelist>" -# \styleproperty {Universal.accent} {enumeration} {html-target-id} +# \styleproperty {propertyname} {enumeration} # \target html-target-id # This property holds ... # (empty line) # \endstyleproperty -macro.styleproperty.HTML = "<div class=\"qmlproto\"><table class=\"qmlname\"><tbody><tr valign=\"top\" class=\"odd\" id=\"\3\"><td class=\"tblQmlPropNode\"><p><span class=\"name\">\1</span> : <span class=\"type\">\2</span></p></td></tr></tbody></table></div>" -macro.endstyleproperty = "\\br" +macro.styleproperty.HTML = "<div class=\"qmlproto\"><table class=\"qmlname\"><tbody><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><span class=\"name\">\1</span> : <span class=\"type\">\2</span></p></td></tr></tbody></table></div>" +macro.endstyleproperty.HTML = "<br/>" +macro.styleproperty.DocBook = "<db:section><db:title>\1 : \2</db:title><db:fieldsynopsis><db:type>\2</db:type><db:varname>\1</db:varname></db:fieldsynopsis>" +macro.endstyleproperty.DocBook = "</db:section>" -# \stylemethod {returntype} {methodname} {argtype} {argname} {html-target-id} +# \stylemethod {returntype} {methodname} {argtype} {argname} # \target html-target-id # This property holds ... # (empty line) # \endstylemethod -macro.stylemethod.HTML = "<div class=\"qmlproto\"><table class=\"qmlname\"><tbody><tr valign=\"top\" class=\"odd\" id=\"\5\"><td class=\"tblQmlFuncNode\"><p><span class=\"type\">\1</span> <span class=\"name\">\2</span>(<span class="type">\3</span> <i>\4</i>)</p></td></tr></tbody></table></div>" -macro.endstylemethod = "\\br" +macro.stylemethod.HTML = "<div class=\"qmlproto\"><table class=\"qmlname\"><tbody><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><span class=\"type\">\1</span> <span class=\"name\">\2</span>(<span class="type">\3</span> <i>\4</i>)</p></td></tr></tbody></table></div>" +macro.endstylemethod.HTML = "<br/>" +macro.stylemethod.DocBook = "<db:section><db:title>\1 \2(\3 <db:emphasis>\4</db:emphasis>)</db:title><db:methodsynopsis><db:type>\1</db:type><db:methodname>\2</db:methodname><db:methodparam><db:type>\3</db:type><db:parameter>\4</db:parameter></db:methodparam></db:methodsynopsis>" +macro.endstylemethod.DocBook = "</db:section>" -# \stylemethod2 {returntype} {methodname} {arg1type} {arg1name} {arg2type} {arg2name} {html-target-id} +# \stylemethod2 {returntype} {methodname} {arg1type} {arg1name} {arg2type} {arg2name} # \target html-target-id # This method returns ... # (empty line) # \endstylemethod2 -macro.stylemethod2.HTML = "<div class=\"qmlproto\"><table class=\"qmlname\"><tbody><tr valign=\"top\" class=\"odd\" id=\"\7\"><td class=\"tblQmlFuncNode\"><p><span class=\"type\">\1</span> <span class=\"name\">\2</span>(<span class="type">\3</span> <i>\4</i>, <span class="type">\5</span> <i>\6</i>)</p></td></tr></tbody></table></div>" -macro.endstylemethod2 = "\\br" +macro.stylemethod2.HTML = "<div class=\"qmlproto\"><table class=\"qmlname\"><tbody><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><span class=\"type\">\1</span> <span class=\"name\">\2</span>(<span class="type">\3</span> <i>\4</i>, <span class="type">\5</span> <i>\6</i>)</p></td></tr></tbody></table></div>" +macro.endstylemethod2.HTML = "<br/>" +macro.stylemethod2.DocBook = "<db:section><db:title>\1 \2(\3 <db:emphasis>\4</db:emphasis>)</db:title><db:methodsynopsis><db:type>\1</db:type><db:methodname>\2</db:methodname><db:methodparam><db:type>\3</db:type><db:parameter>\4</db:parameter></db:methodparam><db:methodparam><db:type>\5</db:type><db:parameter>\6</db:parameter></db:methodparam></db:methodsynopsis>" +macro.endstylemethod2.DocBook = "</db:section>" # \stylecolor {#6A00FF} {(default)} macro.stylecolor.HTML = "<div style=\"padding:10px;color:#fff;background:\1;\">\1 \2</div>" +macro.stylecolor.DocBook = "<db:phrase role=\"color:\1\">\1 \2</db:phrase>" macro.nbsp.HTML = " " +macro.nbsp.DocBook = " " -#Add output suffix to the html filenames -outputsuffixes = QML -outputsuffixes.QML = 2 +manifestmeta.highlighted.names = \ + "QtQuickControls/File System Explorer" \ + "QtQuickControls/Qt Quick Controls - Wearable Demo" \ + "QtQuickControls/Qt Quick Controls - Gallery" \ + "QtQuickControls/Qt Quick Controls - Event Calendar" \ + "QtQuickControls/Qt Quick Controls - Contact List" -# Fail the documentation build if there are more warnings than the limit +# Enforce zero documentation warnings warninglimit = 0 diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-action.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-action.qml index 4f50ba46d7..5b003e622c 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-action.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-action.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-busyindicator-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-busyindicator-custom.qml index 3eefb11110..7e57e6bbe7 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-busyindicator-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-busyindicator-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic BusyIndicator { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-button-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-button-custom.qml index cf197a18ae..13ac86e549 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-button-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-button-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic Button { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-button-icononly.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-button-icononly.qml index 027ecb4ed8..d56fee4b5a 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-button-icononly.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-button-icononly.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-button-textbesideicon.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-button-textbesideicon.qml index c2dce1d99a..c2d2e8e52f 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-button-textbesideicon.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-button-textbesideicon.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-button-textonly.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-button-textonly.qml index 4b12b8acc2..ef239d9814 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-button-textonly.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-button-textonly.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-calendarmodel.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-calendarmodel.qml index af2777b123..c0fcda2d41 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-calendarmodel.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-calendarmodel.qml @@ -1,5 +1,5 @@ // Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-checkbox-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-checkbox-custom.qml index a7421af39c..1cc413aae3 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-checkbox-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-checkbox-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic CheckBox { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-checkbox-group.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-checkbox-group.qml index 0d676be397..75f64593eb 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-checkbox-group.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-checkbox-group.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-checkdelegate-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-checkdelegate-custom.qml index a4f4b84d18..2cee3313eb 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-checkdelegate-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-checkdelegate-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic CheckDelegate { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-accepted.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-accepted.qml index 6f5eff6b55..0362041e18 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-accepted.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-accepted.qml @@ -1,5 +1,5 @@ // Copyright (C) 2019 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-custom.qml index 2481f6dcf8..0cc408d492 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-custom.qml @@ -1,20 +1,25 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] +pragma ComponentBehavior: Bound + import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic ComboBox { id: control model: ["First", "Second", "Third"] delegate: ItemDelegate { + id: delegate + + required property var model + required property int index + width: control.width contentItem: Text { - text: control.textRole - ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) - : modelData + text: delegate.model[control.textRole] color: "#21be2b" font: control.font elide: Text.ElideRight diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-find.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-find.qml index 2513002264..d6af08166f 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-find.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-find.qml @@ -1,5 +1,5 @@ // Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-popup.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-popup.qml index 8c636a3d5c..94ffa2b2bc 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-popup.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-popup.qml @@ -1,5 +1,5 @@ // Copyright (C) 2022 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-textat.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-textat.qml index 8910ba3237..e81ae17dd0 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-textat.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-textat.qml @@ -1,5 +1,5 @@ // Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-valuerole.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-valuerole.qml index 8d32201799..9329b19d1c 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-valuerole.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-combobox-valuerole.qml @@ -1,5 +1,5 @@ // Copyright (C) 2019 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-container-oncurrentindexchanged.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-container-oncurrentindexchanged.qml new file mode 100644 index 0000000000..19b48191ee --- /dev/null +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-container-oncurrentindexchanged.qml @@ -0,0 +1,13 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick.Controls + +Container { + //! [1] + onCurrentIndexChanged: { + print("currentIndex changed to", currentIndex) + // ... + } + //! [1] +} diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-custom-palette-buttons.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-custom-palette-buttons.qml new file mode 100644 index 0000000000..3b72207d87 --- /dev/null +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-custom-palette-buttons.qml @@ -0,0 +1,43 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +//![entire] +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts + +ApplicationWindow { + visible: true + + //![palette] + palette { + buttonText: "red" + button: "khaki" + + disabled { + buttonText: "lavender" + button: "coral" + } + } + //![palette] + + ColumnLayout { + id: layout + anchors.fill: parent + anchors.margins: 3 + Button { + text: qsTr("Disabled button") + enabled: false + } + + Button { + text: qsTr("Enabled button") + } + + TextField { + Layout.fillWidth: true + placeholderText: "type something here" + } + } +} +//![entire] diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-dayofweekrow-layout.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-dayofweekrow-layout.qml index 2358f252e0..7824faeb3e 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-dayofweekrow-layout.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-dayofweekrow-layout.qml @@ -1,5 +1,5 @@ // Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-dayofweekrow.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-dayofweekrow.qml index 2188b4ccf1..f5d1edab0f 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-dayofweekrow.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-dayofweekrow.qml @@ -1,5 +1,5 @@ // Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-delaybutton-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-delaybutton-custom.qml index a8b17ab36a..861c558e3c 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-delaybutton-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-delaybutton-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic DelayButton { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-dial-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-dial-custom.qml index f1efc22c4d..06399a318a 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-dial-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-dial-custom.qml @@ -1,15 +1,17 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic Dial { id: control background: Rectangle { x: control.width / 2 - width / 2 y: control.height / 2 - height / 2 + implicitWidth: 140 + implicitHeight: 140 width: Math.max(64, Math.min(control.width, control.height)) height: width color: "transparent" diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-dialog-modal.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-dialog-modal.qml index ba1580a4df..7258df5873 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-dialog-modal.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-dialog-modal.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-dialog-modeless.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-dialog-modeless.qml index d70c9921e2..05d06a7dae 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-dialog-modeless.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-dialog-modeless.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-dialog.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-dialog.qml index 4d774c4e10..7fb50e6169 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-dialog.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-dialog.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-dialogbuttonbox-attached.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-dialogbuttonbox-attached.qml index ef85771bfd..7582d605fa 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-dialogbuttonbox-attached.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-dialogbuttonbox-attached.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-dialogbuttonbox.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-dialogbuttonbox.qml index 13a927520f..424be46707 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-dialogbuttonbox.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-dialogbuttonbox.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-frame-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-frame-custom.qml index de3e1a2327..8498d9bae2 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-frame-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-frame-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic Frame { background: Rectangle { diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-frame.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-frame.qml index fcb128db54..f5bfd6178f 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-frame.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-frame.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Layouts diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-groupbox-checkable.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-groupbox-checkable.qml index 0ab0822aca..fa6a91065f 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-groupbox-checkable.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-groupbox-checkable.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Layouts diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-groupbox-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-groupbox-custom.qml index 34d9df8a63..675e2d5e47 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-groupbox-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-groupbox-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic GroupBox { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-groupbox.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-groupbox.qml index 98282ed348..9fb7a20873 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-groupbox.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-groupbox.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Layouts diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-headerview.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-headerview.qml new file mode 100644 index 0000000000..b8f6935010 --- /dev/null +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-headerview.qml @@ -0,0 +1,79 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +//![0] +import QtQuick +import QtQuick.Controls +import Qt.labs.qmlmodels + +ApplicationWindow { + visible: true + width: 640 + height: 480 + title: qsTr("HeaderView") + + Rectangle { + anchors.fill: parent + // The background color will show through the cell + // spacing, and therefore become the grid line color. + color: Qt.styleHints.appearance === Qt.Light ? palette.mid : palette.midlight + + HorizontalHeaderView { + id: horizontalHeader + anchors.left: tableView.left + anchors.top: parent.top + syncView: tableView + clip: true + } + + VerticalHeaderView { + id: verticalHeader + anchors.top: tableView.top + anchors.left: parent.left + syncView: tableView + clip: true + } + + TableView { + id: tableView + anchors.left: verticalHeader.right + anchors.top: horizontalHeader.bottom + anchors.right: parent.right + anchors.bottom: parent.bottom + clip: true + + columnSpacing: 1 + rowSpacing: 1 + + model: TableModel { + TableModelColumn { display: "name" } + TableModelColumn { display: "color" } + + rows: [ + { + "name": "cat", + "color": "black" + }, + { + "name": "dog", + "color": "brown" + }, + { + "name": "bird", + "color": "white" + } + ] + } + + delegate: Rectangle { + implicitWidth: 100 + implicitHeight: 20 + color: palette.base + Label { + text: display + } + } + } + } +//![0] +} diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-itemdelegate-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-itemdelegate-custom.qml index 3212cbc762..5e299a9d8f 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-itemdelegate-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-itemdelegate-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic ItemDelegate { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-itemdelegate.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-itemdelegate.qml index 49c12b1dff..33e9974094 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-itemdelegate.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-itemdelegate.qml @@ -1,11 +1,12 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls //! [1] ListView { + id: listView width: 160 height: 240 @@ -13,7 +14,7 @@ ListView { delegate: ItemDelegate { text: modelData - width: parent.width + width: listView.width onClicked: console.log("clicked:", modelData) required property string modelData diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-label-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-label-custom.qml index 79bc9d3c13..291d04948f 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-label-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-label-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic Label { text: qsTr("Label") diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-label.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-label.qml index 7ca63d0251..3dae69a1e1 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-label.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-label.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-material-accent.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-material-accent.qml index 71a84fac82..5c6b58533a 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-material-accent.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-material-accent.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Layouts diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-material-attributes.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-material-attributes.qml new file mode 100644 index 0000000000..1f0298de44 --- /dev/null +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-material-attributes.qml @@ -0,0 +1,120 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Controls.Material +import QtQuick.Shapes + +Pane { + width: 400 + height: 300 + + Page { + anchors.fill: parent + anchors.margins: 40 + + header: ToolBar { + Label { + text: "Material" + anchors.centerIn: parent + } + } + + TextField { + id: textField + text: "TextField" + anchors.centerIn: parent + + Component.onCompleted: forceActiveFocus() + } + } + + component Line: Shape { + // Account for 1-pixel-wide lines. + width: Math.max(1, endX - startX) + height: Math.max(1, endY - startY) + + layer.enabled: true + layer.samples: 4 + + property alias startX: shapePath.startX + property alias startY: shapePath.startY + property alias endX: pathLine.x + property alias endY: pathLine.y + + ShapePath { + id: shapePath + strokeWidth: 1 + strokeColor: "#444" + + PathLine { + id: pathLine + } + } + } + + Label { + id: primaryLabel + x: 40 + y: 3 + text: "Primary" + } + Line { + id: primaryLine + x: primaryLabel.x + primaryLabel.width / 2 + y: primaryLabel.y + primaryLabel.height + startX: 0.5 + startY: 0 + endX: 0.5 + endY: 40 + } + + Label { + id: foregroundLabel + anchors.horizontalCenter: parent.horizontalCenter + y: 3 + text: "Foreground" + } + Line { + id: foregroundLine + x: foregroundLabel.x + foregroundLabel.width / 2 + y: foregroundLabel.y + foregroundLabel.height + // Lines are drawn at the center of the pixel. + startX: 0.5 + startY: 0 + endX: 0.5 + endY: 34 + } + + Label { + id: accentLabel + anchors.horizontalCenter: parent.horizontalCenter + y: parent.height * 0.825 + text: "Accent" + } + Line { + id: accentLine + x: accentLabel.x + accentLabel.width / 2 + y: parent.height * 0.7 + startX: 0.5 + startY: 0 + endX: 0.5 + endY: 38 + } + + Label { + id: backgroundLabel + x: parent.width - width - 10 + y: parent.height - height - 10 + text: "Background" + } + Line { + id: backgroundLine + x: backgroundLabel.x + backgroundLabel.width / 2 + y: backgroundLabel.y - height + startX: 0.5 + startY: 0 + endX: 0.5 + endY: 40 + } +} diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-material-background.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-material-background.qml index f9f1dd0915..8d4829e17a 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-material-background.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-material-background.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-material-elevation.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-material-elevation.qml index 4f8b27e7ef..8b84623dab 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-material-elevation.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-material-elevation.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-material-foreground.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-material-foreground.qml index b4a7743c16..d2c120e0e1 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-material-foreground.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-material-foreground.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-material-theme.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-material-theme.qml index 4e5bf81cd9..bacb630a28 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-material-theme.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-material-theme.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-material-variant.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-material-variant.qml index ad824f1e34..bd2f42e66d 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-material-variant.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-material-variant.qml @@ -1,5 +1,15 @@ // Copyright (C) 2018 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +/* + This file is used by tst_snippets to generate qtquickcontrols-material-variant-normal.png: + + SCREENSHOTS=1 ./tst_snippets verify:qtquickcontrols-material-variant + + and qtquickcontrols-material-variant-dense.png: + + SCREENSHOTS=1 QT_QUICK_CONTROLS_MATERIAL_VARIANT=Dense ./tst_snippets verify:qtquickcontrols-material-variant +*/ import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-menu-createObject.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-menu-createObject.qml index 31991ced70..c6582fc037 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-menu-createObject.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-menu-createObject.qml @@ -1,5 +1,5 @@ // Copyright (C) 2022 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-menu-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-menu-custom.qml index f38d5f370a..a0b59adffd 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-menu-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-menu-custom.qml @@ -1,8 +1,8 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic ApplicationWindow { id: window diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-menu-instantiator.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-menu-instantiator.qml index cda91182df..6ceeb217b3 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-menu-instantiator.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-menu-instantiator.qml @@ -1,5 +1,5 @@ // Copyright (C) 2022 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-menubar-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-menubar-custom.qml index 2d2d15efdf..ef55a5f4c2 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-menubar-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-menubar-custom.qml @@ -1,8 +1,8 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic ApplicationWindow { id: window diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-menubar.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-menubar.qml index 55064604b4..b7f3a32f80 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-menubar.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-menubar.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-menuseparator-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-menuseparator-custom.qml index 2b66187e10..fbc024aa57 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-menuseparator-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-menuseparator-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic Item { id: window diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-menuseparator.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-menuseparator.qml index 6be0de85bc..34c5933788 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-menuseparator.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-menuseparator.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-monthgrid-layout.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-monthgrid-layout.qml index 0620ee6d0b..0ac8ef912e 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-monthgrid-layout.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-monthgrid-layout.qml @@ -1,5 +1,5 @@ // Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-monthgrid-localization.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-monthgrid-localization.qml index 56a801ab75..e5bdc4fa37 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-monthgrid-localization.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-monthgrid-localization.qml @@ -1,5 +1,5 @@ // Copyright (C) 2022 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause pragma ComponentBehavior: Bound diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-monthgrid.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-monthgrid.qml index c630edbe26..72aba7827f 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-monthgrid.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-monthgrid.qml @@ -1,5 +1,5 @@ // Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-overlay-modal.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-overlay-modal.qml index d1537d73bf..25a7485121 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-overlay-modal.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-overlay-modal.qml @@ -1,5 +1,5 @@ // Copyright (C) 2018 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-overlay-modeless.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-overlay-modeless.qml index 06ebb16fb1..c51f8caea6 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-overlay-modeless.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-overlay-modeless.qml @@ -1,5 +1,5 @@ // Copyright (C) 2018 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-overview.cmake b/src/quickcontrols/doc/snippets/qtquickcontrols-overview.cmake index 6aa63152db..cb9ccdf309 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-overview.cmake +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-overview.cmake @@ -1,5 +1,5 @@ # Copyright (C) 2022 The Qt Company Ltd. -# SPDX-License-Identifier: BSD-3-Clause +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #! [0] find_package(Qt6 REQUIRED COMPONENTS QuickControls2) diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator-custom.qml index 5372c41f31..14b4131c75 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic PageIndicator { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator-interactive.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator-interactive.qml index e3e65beb22..d940f395ef 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator-interactive.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator-interactive.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator.qml index 6929565825..c0ae199360 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-pane-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-pane-custom.qml index 96e3db1f37..aca3f73dc6 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-pane-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-pane-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic Pane { background: Rectangle { diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-pane.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-pane.qml index ed1b80d4e8..88282170c7 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-pane.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-pane.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Layouts diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-popup-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-popup-custom.qml index 951dfa7d52..cae29d238d 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-popup-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-popup-custom.qml @@ -1,8 +1,8 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic import QtQuick.Window Item { diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-popup-property-propagation.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-popup-property-propagation.qml new file mode 100644 index 0000000000..7f34cd31e2 --- /dev/null +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-popup-property-propagation.qml @@ -0,0 +1,59 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +//! [file] +import QtQuick.Controls.Basic + +ApplicationWindow { + width: 500 + height: 500 + visible: true + font.pixelSize: 20 + palette.windowText: "steelblue" + + // This will have a pixelSize of 20 and be "steelblue" in color. + header: Label { + text: "ApplicationWindow Label" + leftPadding: 20 + topPadding: 20 + } + + Pane { + width: 400 + height: 400 + anchors.centerIn: parent + palette.window: "#edf3f8" + palette.windowText: "tomato" + + // This will have a pixelSize of 20 and be "tomato" in color. + Label { + text: "Pane Label" + } + + Popup { + width: 300 + height: 300 + anchors.centerIn: parent + font.pixelSize: 10 + visible: true + + // This will have a pixelSize of 10 and "steelblue" in color. + Label { + text: "Popup Label" + } + + Popup { + width: 200 + height: 200 + anchors.centerIn: parent + visible: true + + // This will have a pixelSize of 20 and be "steelblue" in color. + Label { + text: "Child Popup Label" + } + } + } + } +} +//! [file] diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-popup.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-popup.qml index 5b9ec29fb2..5a768efeab 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-popup.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-popup.qml @@ -1,5 +1,5 @@ // Copyright (C) 2018 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-progressbar-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-progressbar-custom.qml index 7158232081..97cad51926 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-progressbar-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-progressbar-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic ProgressBar { id: control @@ -21,11 +21,40 @@ ProgressBar { implicitWidth: 200 implicitHeight: 4 + // Progress indicator for determinate state. Rectangle { width: control.visualPosition * parent.width height: parent.height radius: 2 color: "#17a81a" + visible: !control.indeterminate + } + + // Scrolling animation for indeterminate state. + Item { + anchors.fill: parent + visible: control.indeterminate + clip: true + + Row { + spacing: 20 + + Repeater { + model: control.width / 40 + 1 + + Rectangle { + color: "#17a81a" + width: 20 + height: control.height + } + } + XAnimator on x { + from: 0 + to: -40 + loops: Animation.Infinite + running: control.indeterminate + } + } } } } diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-radiobutton-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-radiobutton-custom.qml index 929fe7e8e2..3fa1659eec 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-radiobutton-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-radiobutton-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic RadioButton { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-radiodelegate-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-radiodelegate-custom.qml index 5eb856b8b5..55c571fab1 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-radiodelegate-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-radiodelegate-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic RadioDelegate { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-rangeslider-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-rangeslider-custom.qml index 81bcb0d668..a83ebe8240 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-rangeslider-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-rangeslider-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic RangeSlider { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-roundbutton.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-roundbutton.qml index d83e4abc32..a8f0e4405d 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-roundbutton.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-roundbutton.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-active.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-active.qml index 5292bc5499..d3b3044ec7 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-active.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-active.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-custom.qml index 2a4faede61..d97627f083 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic ScrollBar { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-non-attached.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-non-attached.qml index 6ba505b199..26f416f580 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-non-attached.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-non-attached.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-policy-alwayson-when-needed.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-policy-alwayson-when-needed.qml new file mode 100644 index 0000000000..a960d7ccea --- /dev/null +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-policy-alwayson-when-needed.qml @@ -0,0 +1,21 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Controls + +ListView { + id: listView + anchors.fill: parent + model: 20 + delegate: ItemDelegate { + width: listView.width + text: modelData + } + + ScrollBar.vertical: ScrollBar { + //! [1] + policy: listView.contentHeight > listView.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff + //! [1] + } +} diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-policy.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-policy-alwayson.qml index 7f08912e7e..64286eb980 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-policy.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollbar-policy-alwayson.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollindicator-active.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollindicator-active.qml index 0f6afdfc4d..0522be2ca2 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollindicator-active.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollindicator-active.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollindicator-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollindicator-custom.qml index f447fd4c94..c46832b2c3 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollindicator-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollindicator-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic ScrollIndicator { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollindicator-non-attached.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollindicator-non-attached.qml index 063c771f1b..66d09e2698 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollindicator-non-attached.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollindicator-non-attached.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview-custom.qml index 2f23b9fd58..05c4ce413e 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview-custom.qml @@ -1,8 +1,8 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic Item { width: 200 diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview-interactive.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview-interactive.qml index 3f7bc8eb6d..728b9d874f 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview-interactive.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview-interactive.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview-listview.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview-listview.qml index 053e8e395a..4d1a0c7192 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview-listview.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview-listview.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview-policy.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview-policy.qml index fa75cd14ed..445a14b4ee 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview-policy.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview-policy.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview.qml index e7f1adf758..18b6bc0de7 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-scrollview.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-selectionrectangle.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-selectionrectangle.qml index a53941e824..472b1b79d8 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-selectionrectangle.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-selectionrectangle.qml @@ -2,8 +2,6 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick - -import QtQuick import QtQuick.Window import QtQuick.Controls import QtQml.Models diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-slider-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-slider-custom.qml index 66e0bd7990..26565d3987 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-slider-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-slider-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic Slider { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox-custom.qml index b32106a5bd..20b149d611 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic SpinBox { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox-double.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox-double.qml index fe2dfbd722..ec1273d1af 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox-double.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox-double.qml @@ -1,32 +1,40 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls //! [1] SpinBox { - id: spinbox + id: spinBox from: 0 - value: 110 - to: 100 * 100 - stepSize: 100 + value: decimalToInt(1.1) + to: decimalToInt(100) + stepSize: decimalFactor + editable: true anchors.centerIn: parent property int decimals: 2 - property real realValue: value / 100 + property real realValue: value / decimalFactor + readonly property int decimalFactor: Math.pow(10, decimals) + + function decimalToInt(decimal) { + return decimal * decimalFactor + } validator: DoubleValidator { - bottom: Math.min(spinbox.from, spinbox.to) - top: Math.max(spinbox.from, spinbox.to) + bottom: Math.min(spinBox.from, spinBox.to) + top: Math.max(spinBox.from, spinBox.to) + decimals: spinBox.decimals + notation: DoubleValidator.StandardNotation } textFromValue: function(value, locale) { - return Number(value / 100).toLocaleString(locale, 'f', spinbox.decimals) + return Number(value / decimalFactor).toLocaleString(locale, 'f', spinBox.decimals) } valueFromText: function(text, locale) { - return Number.fromLocaleString(locale, text) * 100 + return Math.round(Number.fromLocaleString(locale, text) * decimalFactor) } } //! [1] diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox-prefix.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox-prefix.qml new file mode 100644 index 0000000000..4db5081210 --- /dev/null +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox-prefix.qml @@ -0,0 +1,30 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Controls + +//! [1] +SpinBox { + id: spinBox + from: 0 + value: 11 + to: 100 + editable: true + anchors.centerIn: parent + + property string prefix: "L=" + property string suffix: "m" + + validator: RegularExpressionValidator { regularExpression: /\D*(-?\d*\.?\d*)\D*/ } + + textFromValue: function(value, locale) { + return prefix + Number(value).toLocaleString(locale, 'f', 0) + suffix + } + + valueFromText: function(text, locale) { + let re = /\D*(-?\d*\.?\d*)\D*/ + return Number.fromLocaleString(locale, re.exec(text)[1]) + } +} +//! [1] diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox-textual.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox-textual.qml index 271cad0f07..fcc932ee4d 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox-textual.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox-textual.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox.qml index 24fac81ca6..1813429dd5 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-splitview-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-splitview-custom.qml index 0d5452c25d..bb2c29ac6a 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-splitview-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-splitview-custom.qml @@ -1,8 +1,8 @@ // Copyright (C) 2018 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic Item { width: 200 diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-splitview-handle-containmentmask.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-splitview-handle-containmentmask.qml index f12bfe1da8..08546f2f03 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-splitview-handle-containmentmask.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-splitview-handle-containmentmask.qml @@ -1,5 +1,5 @@ // Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-stackview-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-stackview-custom.qml index 381fbe6b95..2f0ea85c77 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-stackview-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-stackview-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic StackView { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-stackview-visible.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-stackview-visible.qml index d711a02e1a..e22d4904b0 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-stackview-visible.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-stackview-visible.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-swipedelegate-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-swipedelegate-custom.qml index 973511c418..eb691bc9d3 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-swipedelegate-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-swipedelegate-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic SwipeDelegate { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-swipedelegate-transition.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-swipedelegate-transition.qml index 4215ea9202..3c461cfe4f 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-swipedelegate-transition.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-swipedelegate-transition.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-swipedelegate.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-swipedelegate.qml index fb2df4f6d3..9470de2d31 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-swipedelegate.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-swipedelegate.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls @@ -21,6 +21,7 @@ ListView { required property string sender required property string title + required property int index ListView.onRemove: SequentialAnimation { PropertyAction { @@ -52,8 +53,6 @@ ListView { SwipeDelegate.onClicked: listView.model.remove(index) - required property int index - background: Rectangle { color: deleteLabel.SwipeDelegate.pressed ? Qt.darker("tomato", 1.1) : "tomato" } diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-swipeview-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-swipeview-custom.qml index e77bc9a3e8..cad89faa06 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-swipeview-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-swipeview-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic SwipeView { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-swipeview-indicator.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-swipeview-indicator.qml index 1831d92b9f..62cd48ff14 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-swipeview-indicator.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-swipeview-indicator.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-switch-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-switch-custom.qml index 5ca4b96140..c905d4c122 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-switch-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-switch-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic Switch { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-switchdelegate-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-switchdelegate-custom.qml index 13cc7b4402..605e5476d5 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-switchdelegate-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-switchdelegate-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic SwitchDelegate { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar-custom.qml index cdce972150..4017553ef9 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic TabBar { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar-explicit.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar-explicit.qml index 2293984e30..1c3e574d61 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar-explicit.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar-explicit.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar-flickable.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar-flickable.qml index 3851b226bd..d686d452e9 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar-flickable.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar-flickable.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar.qml index 3ce32c1c50..cc3fdfaced 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tabbar.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Layouts diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tabbutton.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tabbutton.qml index c397092a8a..66994f8956 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-tabbutton.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tabbutton.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-textarea-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-textarea-custom.qml index 39a94e13cc..700cebafe1 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-textarea-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-textarea-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic TextArea { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-textarea-scrollable.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-textarea-scrollable.qml index 7f915815e3..fe884140a1 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-textarea-scrollable.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-textarea-scrollable.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-textfield-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-textfield-custom.qml index c4d0c88c2a..740e226662 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-textfield-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-textfield-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic TextField { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-textfield-disabled.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-textfield-disabled.qml index aa8639190c..8b432ff827 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-textfield-disabled.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-textfield-disabled.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-textfield-focused.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-textfield-focused.qml index 62299eeabc..e6892ec3f9 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-textfield-focused.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-textfield-focused.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-textfield-normal.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-textfield-normal.qml index 72a5626142..272c3f3d6a 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-textfield-normal.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-textfield-normal.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-toolbar-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-toolbar-custom.qml index 2aabcbfbe3..75e8f11778 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-toolbar-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-toolbar-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Layouts -import QtQuick.Controls +import QtQuick.Controls.Basic //! [file] ToolBar { diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-toolbar.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-toolbar.qml index cb07df80f6..64ec4d5431 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-toolbar.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-toolbar.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Layouts diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-toolbutton-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-toolbutton-custom.qml index 6ec46b0adf..ea81bc9766 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-toolbutton-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-toolbutton-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic ToolButton { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-toolseparator-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-toolseparator-custom.qml index 201e04b0e8..28de544242 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-toolseparator-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-toolseparator-custom.qml @@ -1,10 +1,10 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Layouts import QtQuick.Window -import QtQuick.Controls +import QtQuick.Controls.Basic //! [file] ToolBar { diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-toolseparator.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-toolseparator.qml index eb3543402d..f1fc11e7d9 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-toolseparator.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-toolseparator.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Layouts diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-custom.qml index 089e6d02b9..cde93b1abd 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic Item { ToolTip { diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-hover.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-hover.qml index 289334d20d..b84f8c30da 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-hover.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-hover.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-pressandhold.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-pressandhold.qml index e209ce9ce9..a2fd762d75 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-pressandhold.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-pressandhold.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-slider.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-slider.qml index 823e7f1842..99b2d62047 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-slider.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-slider.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Window diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip.qml index d0cf142376..1abaab2d62 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Window diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tumbler-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tumbler-custom.qml index 3487e7316d..ee94097acd 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-tumbler-custom.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tumbler-custom.qml @@ -1,9 +1,9 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [file] import QtQuick -import QtQuick.Controls +import QtQuick.Controls.Basic Tumbler { id: control diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tumbler-listView.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tumbler-listView.qml index 1b39c2aa16..1d531f0514 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-tumbler-listView.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tumbler-listView.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tumbler-pathView.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tumbler-pathView.qml index 30e90b2ba5..b3ef0bea68 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-tumbler-pathView.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tumbler-pathView.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tumbler-timePicker.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tumbler-timePicker.qml index a5d4b3585a..f174373c30 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-tumbler-timePicker.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tumbler-timePicker.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //! [tumbler] import QtQuick diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-universal-accent.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-universal-accent.qml index 52aca6eea9..6a0913dfe5 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-universal-accent.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-universal-accent.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Layouts diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-universal-background.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-universal-background.qml index 106549f789..a48dce116a 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-universal-background.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-universal-background.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-universal-foreground.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-universal-foreground.qml index 491a4f94d4..a09011579a 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-universal-foreground.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-universal-foreground.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-universal-theme.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-universal-theme.qml index 5ade2c7c55..55b8244561 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-universal-theme.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-universal-theme.qml @@ -1,5 +1,5 @@ // Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-weeknumbercolumn-layout.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-weeknumbercolumn-layout.qml index 6d1dd1ba79..1c0cb34ce2 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-weeknumbercolumn-layout.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-weeknumbercolumn-layout.qml @@ -1,5 +1,5 @@ // Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-weeknumbercolumn.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-weeknumbercolumn.qml index e3c757a0b8..3cff1a329e 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-weeknumbercolumn.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-weeknumbercolumn.qml @@ -1,5 +1,5 @@ // Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick import QtQuick.Controls diff --git a/src/quickcontrols/doc/src/includes/container-currentindex.qdocinc b/src/quickcontrols/doc/src/includes/container-currentindex.qdocinc index 9fcf43e168..776e39dcfc 100644 --- a/src/quickcontrols/doc/src/includes/container-currentindex.qdocinc +++ b/src/quickcontrols/doc/src/includes/container-currentindex.qdocinc @@ -6,4 +6,10 @@ of each control. To do this without breaking bindings, avoid setting \c currentIndex directly, and instead use \l {Container::}{setCurrentIndex()}, for example. See \l {Managing the Current Index} for more information. + +To perform an action when \c currentIndex changes, use the +\c onCurrentIndexChanged +\l {Property Change Signal Handlers}{property change signal handler}: + +\snippet qtquickcontrols-container-oncurrentindexchanged.qml 1 //! [file] diff --git a/src/quickcontrols/doc/src/includes/qquickcontrol-focusreason.qdocinc b/src/quickcontrols/doc/src/includes/qquickcontrol-focusreason.qdocinc deleted file mode 100644 index b69e9e60ec..0000000000 --- a/src/quickcontrols/doc/src/includes/qquickcontrol-focusreason.qdocinc +++ /dev/null @@ -1,15 +0,0 @@ -This property holds the reason of the last focus change. - -\note This property does not indicate whether the control has \l {Item::activeFocus} - {active focus}, but the reason why the control either gained or lost focus. - -\value Qt.MouseFocusReason A mouse action occurred. -\value Qt.TabFocusReason The Tab key was pressed. -\value Qt.BacktabFocusReason A Backtab occurred. The input for this may include the Shift or Control keys; e.g. Shift+Tab. -\value Qt.ActiveWindowFocusReason The window system made this window either active or inactive. -\value Qt.PopupFocusReason The application opened/closed a pop-up that grabbed/released the keyboard focus. -\value Qt.ShortcutFocusReason The user typed a label's buddy shortcut -\value Qt.MenuBarFocusReason The menu bar took focus. -\value Qt.OtherFocusReason Another reason, usually application-specific. - -\sa Item::activeFocus diff --git a/src/quickcontrols/doc/src/includes/qquickheaderview.qdocinc b/src/quickcontrols/doc/src/includes/qquickheaderview.qdocinc new file mode 100644 index 0000000000..fdc191be3f --- /dev/null +++ b/src/quickcontrols/doc/src/includes/qquickheaderview.qdocinc @@ -0,0 +1,104 @@ +//! [detailed-description] +A \1 provides a styled table header. +It can either be used as an independent view or header for a \l TableView. + +You can add a header for a TableView by assigning a \1 +to the \l {TableView::syncView} property. The header and the table will +then be kept in sync while flicking. + +By default, \1 displays +\l {QAbstractItemModel::headerData()}{header data} +from the \l {TableView::syncView}{sync view's} \l {TableView::model}{model}. +If you don't wish to use this model, you can assign a different model to the +\l {TableView::model}{model} property. If you assign a model that is a +QAbstractItemModel, its header data will be used. Otherwise the data in +the model will be used directly (for example, if you assign a model that +is simply an array of strings). + +\note In order to show the header data of a QAbstractItemModel, \1 +will internally wrap the model's header data in an independent proxy +model. This model shares no model items with the \l {TableView::model}{application model}. +This means that if you call functions such as \l {TableView::index()}{index()}, the model +index you get back will belong to the proxy model and not the application model. + +By default, \l textRole is set to \c "display", meaning that data from the +model's \l {Qt::ItemDataRole}{Qt::DisplayRole} will be used. You can set +this to another role name in order to have that data displayed instead. + +The application is responsible for placing the header at the +correct location in the scene. You can add as many headers as you +want to a single TableView, which can be useful if you for example want +to place headers on all four sides of the table. + +The following snippet shows how you can add a horizontal and vertical header +view to a table view: + +\snippet qtquickcontrols-headerview.qml 0 + +A \1 will have +\l {TableView::resizableColumns}{resizableColumns} set to \c true by default. +//! [detailed-description] + +//! [syncView] +This property holds the TableView to synchronize with. + +Once this property is bound to another TableView, both header and table +will synchronize with regard to column widths, column spacing, and flicking +\1. + +If the \l model is not explicitly set, then the header will use the syncView's +model to label the columns. + +\sa model TableView +//! [syncView] + +//! [model] +This property holds the model providing data for the \1 header view. + +When model is not explicitly set, the header will use the syncView's +model once syncView is set. + +If model is a QAbstractTableModel, its \1 headerData() will +be accessed. + +If model is a QAbstractItemModel other than QAbstractTableModel, model's data() +will be accessed. + +Otherwise, the behavior is same as setting TableView::model. + +\sa TableView {TableView::model} {model} QAbstractTableModel +//! [model] + +//! [textRole] +This property holds the model role used to display text in each header cell. + +When the model has multiple roles, textRole can be set to determine which +role should be displayed. + +If model is a QAbstractItemModel then it will default to "display"; otherwise +it is empty. + +A warning is given if the model's \l {QAbstractItemModel::}{roleNames()} +doesn't provide the role specified in \l textRole. +The warning can be silenced by setting the \l textRole. + +\sa QAbstractItemModel::roleNames() +//! [textRole] + +//! [movableColumns] +This property allows the user to move columns in the view. The default value is +\c false. + +\note If this property is set, the HorizontalHeaderView allows the user to drag +and drop columns at the required position. When syncView is enabled, +any change will be applied to the corresponding view item. +//! [movableColumns] + +//! [movableRows] +This property allows the user to move rows in the view. The default value is \c +false. + +\note If this property is set, the VerticalHeaderView allows the user to drag +and drop rows at the required position. When syncView is enabled, +any change will be applied to the corresponding view item. +//! [movableRows] diff --git a/src/quickcontrols/doc/src/includes/qquickmaterialstyle.qdocinc b/src/quickcontrols/doc/src/includes/qquickmaterialstyle.qdocinc index 803425a88b..dc02dffe39 100644 --- a/src/quickcontrols/doc/src/includes/qquickmaterialstyle.qdocinc +++ b/src/quickcontrols/doc/src/includes/qquickmaterialstyle.qdocinc @@ -77,3 +77,8 @@ for example \c "Grey". \endtable //! [env] + +//! [placeholder-text-multiple-lines] +As per the Material guidelines, placeholder text should be kept short and not +take up multiple lines. +//! [placeholder-text-multiple-lines] diff --git a/src/quickcontrols/doc/src/includes/qquickmenu.qdocinc b/src/quickcontrols/doc/src/includes/qquickmenu.qdocinc new file mode 100644 index 0000000000..86a65338e5 --- /dev/null +++ b/src/quickcontrols/doc/src/includes/qquickmenu.qdocinc @@ -0,0 +1,4 @@ +//! [non-native-only-property] +\note This property is only supported when using a +\l {Native Menus}{non-native Menu}. +//! [non-native-only-property] diff --git a/src/quickcontrols/doc/src/includes/qquickstackview.qdocinc b/src/quickcontrols/doc/src/includes/qquickstackview.qdocinc index 20c9bdc369..16d4e7374c 100644 --- a/src/quickcontrols/doc/src/includes/qquickstackview.qdocinc +++ b/src/quickcontrols/doc/src/includes/qquickstackview.qdocinc @@ -3,3 +3,29 @@ Only items that StackView created itself (from a \l Component or \l [QML] url) will be destroyed when popped. See \l {Item Ownership} for more information. //! [pop-ownership] + +//! [operation-values] +An \a operation can be optionally specified as the last argument. Supported +operations: + +\value StackView.Immediate An immediate operation without transitions. +\value StackView.PushTransition An operation with push transitions. +\value StackView.ReplaceTransition An operation with replace transitions. +\value StackView.PopTransition An operation with pop transitions. +//! [operation-values] + +//! [optional-properties-after-each-item] +The optional properties arguments come after each item, and specify a +map of initial property values. For dynamically created items, these values +are applied before the creation is finalized. This is more efficient than +setting property values after creation, particularly where large sets of +property values are defined, and also allows property bindings to be set +up (using \l{Qt::binding}{Qt.binding()}) before the item is created. +//! [optional-properties-after-each-item] + +//! [replaceCurrentItem] +Pops \l currentItem from the stack and pushes \a \1. If the optional +\a operation is specified, the relevant transition will be used. If the +optional \a properties are specified, they will be applied to the item. +Returns the item that became current. +//! [replaceCurrentItem] diff --git a/src/quickcontrols/doc/src/includes/style-screenshots.qdocinc b/src/quickcontrols/doc/src/includes/style-screenshots.qdocinc new file mode 100644 index 0000000000..b7cd902937 --- /dev/null +++ b/src/quickcontrols/doc/src/includes/style-screenshots.qdocinc @@ -0,0 +1,9 @@ +//! [file] +\table + \row + \li \image qtquickcontrols-\2-light.png + \caption The light theme of the \1 style. + \li \image qtquickcontrols-\2-dark.png + \caption The dark theme of the \1 style. +\endtable +//! [file] diff --git a/src/quickcontrols/doc/src/qtquickcontrols-configuration.qdoc b/src/quickcontrols/doc/src/qtquickcontrols-configuration.qdoc index 26fab0a2ce..7cc61b5701 100644 --- a/src/quickcontrols/doc/src/qtquickcontrols-configuration.qdoc +++ b/src/quickcontrols/doc/src/qtquickcontrols-configuration.qdoc @@ -80,17 +80,12 @@ \section1 Font Configuration The default \l {Control::font}{font} can be specified in a \c Font sub-group - in each style's section in the configuration file. The \c Font sub-group can - be defined in two alternative ways: + in each style's section in the configuration file: \code [Basic] Font\Family=Open Sans Font\PixelSize=20 - - [Material\Font] - Family=Open Sans - PixelSize=20 \endcode Supported font attributes: @@ -137,13 +132,6 @@ Palette\WindowText=#212121 \endcode - or: - \code - [Fusion\Palette] - Window=#dedede - WindowText=#212121 - \endcode - See \l [QtQuick]{Palette} QML type for more information. \section1 Using the Configuration File in a Project @@ -164,12 +152,39 @@ 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: - - \code - RESOURCES = application.qrc + Finally, the \c .qrc file must be listed in the application's build file. + For example: + + \if defined(onlinedocs) + \tab {build-qt-app}{tab-cmake}{CMakeLists.txt (CMake)}{checked} + \tab {build-qt-app}{tab-qmake}{.pro (qmake)}{} + \tabcontent {tab-cmake} + \else + \section2 Using CMake + \endif + \badcode + set(CMAKE_AUTORCC ON) + qt_add_executable(my_app + application.qrc + main.cpp + ... + ) \endcode + \if defined(onlinedocs) + \endtabcontent + \tabcontent {tab-qmake} + \else + \section2 Using qmake + \endif + \badcode + RESOURCES = application.qrc + ... + \endcode + \if defined(onlinedocs) + \endtabcontent + \endif + + See also: \l {Build System Integration} \section1 Related Information diff --git a/src/quickcontrols/doc/src/qtquickcontrols-customize.qdoc b/src/quickcontrols/doc/src/qtquickcontrols-customize.qdoc index 19a2619164..1f12b72822 100644 --- a/src/quickcontrols/doc/src/qtquickcontrols-customize.qdoc +++ b/src/quickcontrols/doc/src/qtquickcontrols-customize.qdoc @@ -183,27 +183,58 @@ \section2 Style-specific C++ Extensions - Sometimes you may need to use C++ to extend your custom style. There are two - ways to expose such types to QML: + Sometimes you may need to use C++ to extend your custom style. \list - \li If the style that uses the type is the only style used by an application, - it's enough to register it with the QML engine via qmlRegisterType(): + \li If the style that uses the type is the only style used by an + application, register the type with the QML engine by adding the QML_ELEMENT + macro and making the file part of your QML module: + \br + \br + + \if defined(onlinedocs) + \tab {expose-cpp-to-qml}{tab-cmake}{CMake}{checked} + \tab {expose-cpp-to-qml}{tab-qmake}{qmake}{} + \tabcontent {tab-cmake} + \else + \section3 Using CMake + \endif + \badcode + qt_add_qml_module(ACoolItem + URI MyItems + VERSION 1.0 + SOURCES + acoolcppitem.cpp acoolcppitem.h + ) + \endcode + \if defined(onlinedocs) + \endtabcontent + \tabcontent {tab-qmake} + \else + \section3 Using QMake + \endif + \code + CONFIG += qmltypes + QML_IMPORT_NAME = MyItems + QML_IMPORT_MAJOR_VERSION = 1 + \endcode + + If the header the class is declared in is not accessible from your + project's include path, you may have to amend the include path so + that the generated registration code can be compiled. \code - qmlRegisterType<ACoolCppItem>("MyApp", 1, 0, "ACoolItem"); + INCLUDEPATH += MyItems \endcode + \if defined(onlinedocs) + \endtabcontent + \endif - See \l {Using C++ Data From QML} for more information about this. + See \l {Defining QML Types from C++} and \l {Building a QML application} + for more information. \li If the style that uses the type is one of many styles used by an - application, it may be better to only register it when necessary. This - is the point at which it would make sense to implement your own - \l {Creating C++ Plugins for QML}{QML plugin}. - - Using a plugin as part of your style is not that much different from - using a set of QML files. The only difference is that the plugin and - its \c qmldir file must be present in the same directory as the QML - files. + application, consider putting each style into a separate module. The + modules will then be loaded on demand. \endlist \section3 Considerations for custom styles @@ -433,9 +464,9 @@ Next, we add a drop shadow to the \l {Control::}{background} delegate of the Button: - \code + \qml // ... - import QtGraphicalEffects + import QtQuick.Effects import MyStyle // ... @@ -443,14 +474,15 @@ // ... layer.enabled: control.enabled && control.MyStyle.elevation > 0 - layer.effect: DropShadow { - verticalOffset: 1 - color: control.visualFocus ? "#330066ff" : "#aaaaaa" - samples: control.MyStyle.elevation - spread: 0.5 + layer.effect: MultiEffect { + shadowEnabled: true + shadowHorizontalOffset: 3 + shadowVerticalOffset: 3 + shadowColor: control.visualFocus ? "#330066ff" : "#aaaaaa" + shadowBlur: control.pressed ? 0.8 : 0.4 } } - \endcode + \endqml Note that we: @@ -525,7 +557,7 @@ \code import QtQuick - import QtQuick.Controls + import QtQuick.Controls.Basic ApplicationWindow { visible: true @@ -590,46 +622,21 @@ \snippet qtquickcontrols-combobox-custom.qml file As explained in \l {ComboBox Model Roles}, ComboBox supports multiple - types of models. If you know that your ComboBox instances will only - ever use one particular type of model, then it is possible to simplify - the code above. + types of models. - For example, if your models will only ever be derived from - \l QAbstractItemModel and have more than one role, the following - binding is sufficient: + Since \l {qml-data-models}{all the models provide an anonymous property} + with \c modelData, the following expression retrieves the right text in + all cases: \code text: model[control.textRole] \endcode - However, if you want to support all standard models, the more complex - binding is necessary, and is explained in detail below. - - \quotefromfile qtquickcontrols-combobox-custom.qml - \skipto control.textRole - \printto Array.isArray - - The first line checks if the \l {ComboBox::}{textRole} property has - been set. It is only necessary to set this property if the model - has more than one role. - - \printline Array.isArray - - If \c textRole has been set, the next step is to check if the model - is an array. - - If it is an array, the \c modelData context property will be available, - and so it must be used. Square bracket notation is used to access - the property of modelData since the property name is not known ahead - of time. - - If it is not an array, the \c model context property must be used - instead. - - \printline modelData - - Finally, if \c textRole has not been set, then the model only has one - role, and so it is sufficient to use the value of \c modelData. + When you provide a specific \c textRole and a model with structured + data that provides the selected role, this is expression is a regular + property lookup. When you provide a model with singular data, such as + a list of strings, and an empty \c textRole, this expression retrieves + the \c modelData. \section2 Customizing DelayButton @@ -721,7 +728,7 @@ \quotefromfile qtquickcontrols-menu-custom.qml \skipto import QtQuick - \printuntil import QtQuick.Controls + \printuntil import QtQuick.Controls.Basic \skipto Menu \printto eof @@ -736,7 +743,7 @@ \quotefromfile qtquickcontrols-menubar-custom.qml \skipto import QtQuick - \printuntil import QtQuick.Controls + \printuntil import QtQuick.Controls.Basic \skipto MenuBar \printto eof @@ -768,7 +775,7 @@ \quotefromfile qtquickcontrols-popup-custom.qml \skipto import QtQuick - \printuntil import QtQuick.Controls + \printuntil import QtQuick.Controls.Basic \codeline \skipto Popup \printuntil { @@ -786,6 +793,9 @@ \snippet qtquickcontrols-progressbar-custom.qml file + Above, the content item is also animated to represent an + \l {ProgressBar::}{indeterminate} progress bar state. + \section2 Customizing RadioButton @@ -1003,7 +1013,7 @@ \quotefromfile qtquickcontrols-tooltip-custom.qml \skipto import QtQuick - \printuntil import QtQuick.Controls + \printuntil import QtQuick.Controls.Basic \skipto ToolTip \printuntil } \printuntil } diff --git a/src/quickcontrols/doc/src/qtquickcontrols-examples.qdoc b/src/quickcontrols/doc/src/qtquickcontrols-examples.qdoc index 8cd6e7f914..76812bcbbe 100644 --- a/src/quickcontrols/doc/src/qtquickcontrols-examples.qdoc +++ b/src/quickcontrols/doc/src/qtquickcontrols-examples.qdoc @@ -3,7 +3,6 @@ /*! \group qtquickcontrols-examples - \ingroup all-examples \keyword Qt Quick Controls Examples \title Qt Quick Controls Examples \keyword Qt Quick Controls 2 Examples diff --git a/src/quickcontrols/doc/src/qtquickcontrols-fileselectors.qdoc b/src/quickcontrols/doc/src/qtquickcontrols-fileselectors.qdoc index 01c9b26bd2..a03970d1d8 100644 --- a/src/quickcontrols/doc/src/qtquickcontrols-fileselectors.qdoc +++ b/src/quickcontrols/doc/src/qtquickcontrols-fileselectors.qdoc @@ -8,7 +8,7 @@ \l {QFileSelector}{File selectors} provide a convenient way of selecting file variants. Qt offers the platform name and the locale as built-in selectors. Qt Quick Controls extends the built-in selectors with the name - (lowercase) of the style that an application is running with. + (Capitalized) of the style that an application is running with. By using file selectors, style-specific tweaks can be applied without creating a hard dependency to a style. From the available file variants, @@ -77,7 +77,7 @@ \code // +Material/CustomButton.qml import QtQuick - import QtGraphicalEffects + import QtQuick.Effects import QtQuick.Controls import QtQuick.Controls.Material @@ -93,11 +93,12 @@ radius: width / 2 layer.enabled: control.enabled - layer.effect: DropShadow { - verticalOffset: 1 - color: Material.dropShadowColor - samples: control.pressed ? 20 : 10 - spread: 0.5 + layer.effect: MultiEffect { + shadowEnabled: true + shadowHorizontalOffset: 3 + shadowVerticalOffset: 3 + shadowColor: Material.dropShadowColor + shadowBlur: control.pressed ? 0.8 : 0.4 } } } diff --git a/src/quickcontrols/doc/src/qtquickcontrols-focus.qdoc b/src/quickcontrols/doc/src/qtquickcontrols-focus.qdoc index c39773020f..f3c1d208bb 100644 --- a/src/quickcontrols/doc/src/qtquickcontrols-focus.qdoc +++ b/src/quickcontrols/doc/src/qtquickcontrols-focus.qdoc @@ -10,7 +10,7 @@ Qt Quick Controls follows the standard \l {Keyboard Focus in Qt Quick}{Qt Quick focus system}, while also providing some added convenience. For example, the - \l {Control::}{focusPolicy} property can be used to control the ways in + \l [QML] {Item::}{focusPolicy} property can be used to control the ways in which a control receives focus. \section1 Focus Scope Controls diff --git a/src/quickcontrols/doc/src/qtquickcontrols-fusion.qdoc b/src/quickcontrols/doc/src/qtquickcontrols-fusion.qdoc index d3c4199e7d..a2db843039 100644 --- a/src/quickcontrols/doc/src/qtquickcontrols-fusion.qdoc +++ b/src/quickcontrols/doc/src/qtquickcontrols-fusion.qdoc @@ -11,7 +11,11 @@ look and feel. It implements the same design language as the \l {Qt Widget Gallery}{Fusion style for Qt Widgets}. - \image qtquickcontrols-fusion.png + The Fusion style automatically switches dark and light themes according to + the system settings. For information on how to set custom theme colors, + refer to the \l {customize-fusion-style}{Customization} section. + + \include style-screenshots.qdocinc {file} {Fusion} {fusion} To run an application with the Fusion style, see \l {Using Styles in Qt Quick Controls}. @@ -22,17 +26,18 @@ rendering engines. \section2 Customization + \target customize-fusion-style The Fusion style uses the standard system \l[QtQuick]{Palette} to provide colors that match the desktop environment. \image qtquickcontrols-fusion-palettes.png - Custom palettes can be specified for any control, - \l{Popup::palette}{popup}, or \l{Window::palette}{application window}. - Explicit palette attributes are automatically propagated from parent to children, - overriding any system defaults for that attribute. In the following example, - the window and all three switches appear with a violet highlight color: + You can specify custom palettes for any control, \l{Popup::palette}{popup}, + or \l{Window::palette}{application window}. Explicit palette attributes are + automatically propagated from parent to children, overriding any system + defaults for that attribute. In the following example, the window and all + three switches appear with a violet highlight color: \table \row diff --git a/src/quickcontrols/doc/src/qtquickcontrols-imagine.qdoc b/src/quickcontrols/doc/src/qtquickcontrols-imagine.qdoc index 2e476c3b24..0f48f3f6a4 100644 --- a/src/quickcontrols/doc/src/qtquickcontrols-imagine.qdoc +++ b/src/quickcontrols/doc/src/qtquickcontrols-imagine.qdoc @@ -129,7 +129,7 @@ \li .9.png (or .png) \row \li \l Dial - \li background + \li background\sup{1} \li disabled, pressed, focused, mirrored, hovered \li .9.png (or .png) \row @@ -469,6 +469,10 @@ \li .9.png (or .png) \endtable + \note \sup{1}) The Imagine style Dial does not yet support the + \l {Dial::}{startAngle} and \l {Dial::}{endAngle} properties that were + introduced in Qt 6.6, and instead uses a fixed background image. + \section2 Asset Examples The following table lists examples of assets (taken from the @@ -2489,7 +2493,7 @@ \section1 Attached Property Documentation - \styleproperty {Imagine.path} {string} {imagine-path-attached-prop} + \styleproperty {Imagine.path} {string} \target imagine-path-attached-prop This attached property holds the path to the image assets... @@ -2506,6 +2510,5 @@ \list \li \l{Styling Qt Quick Controls} \li \l{Qt Quick Controls - Imagine Style Example: Automotive}{Automotive Example} - \li \l{Qt Quick Controls - Imagine Style Example: Music Player}{Music Player Example} \endlist */ diff --git a/src/quickcontrols/doc/src/qtquickcontrols-index.qdoc b/src/quickcontrols/doc/src/qtquickcontrols-index.qdoc index ae16f75078..b3e49e7309 100644 --- a/src/quickcontrols/doc/src/qtquickcontrols-index.qdoc +++ b/src/quickcontrols/doc/src/qtquickcontrols-index.qdoc @@ -105,6 +105,31 @@ \li ... \endtable + \section2 Revisions + + Due to how Qt Quick Controls are implemented, new properties that are added + may clash with any user-defined properties of the same name. For example, + the following snippet will result in an error: + + \qml + import QtQuick.Controls 2.13 + + ApplicationWindow { + // ... + + ComboBox { + anchors.centerIn: parent + + // As currentValue was added in 2.14, the versioned import above + // should cause this property to be used, but instead an error is produced: + // "Cannot override FINAL property" + property int currentValue: 0 + } + } + \endqml + + These properties should be renamed to avoid the conflict. + \section1 Module Evolution Qt Quick Controls was originally written with touch interfaces as the @@ -138,7 +163,6 @@ \li \l{Qt Quick Controls - Text Editor}{Text Editor} \li \l{Qt Quick Controls - Wearable Demo}{Wearable Demo} \li \l{Qt Quick Controls - Imagine Style Example: Automotive}{Automotive Example} - \li \l{Qt Quick Controls - Imagine Style Example: Music Player}{Music Player Example} \li \l{Qt Quick Controls Examples}{All Examples} \endlist diff --git a/src/quickcontrols/doc/src/qtquickcontrols-ios.qdoc b/src/quickcontrols/doc/src/qtquickcontrols-ios.qdoc index 2c90552d20..9e107eecd2 100644 --- a/src/quickcontrols/doc/src/qtquickcontrols-ios.qdoc +++ b/src/quickcontrols/doc/src/qtquickcontrols-ios.qdoc @@ -10,12 +10,6 @@ \styleimport {QtQuick.Controls.iOS} {Qt 6.4} - \section1 Attached Properties - - \list - \li \l {ios-theme-attached-prop}{\b theme} : enumeration - \endlist - \section1 Detailed Description \target detailed-desc-iOS @@ -32,22 +26,15 @@ and iOS and should look the same on both platforms, besides minor differences that may occur due to differences in available system fonts and font rendering engines. - \table - \row - \li \image qtquickcontrols-ios-light.png - \caption The iOS style in light theme - \li \image qtquickcontrols-ios-dark.png - \caption The iOS style in dark theme - \endtable + \include style-screenshots.qdocinc {file} {iOS} {ios} To run an application with the iOS style, see \l {Using Styles in Qt Quick Controls}. \section2 Current state - The iOS style is currently in Tech Preview and is under development. Some controls are not - yet supported. Those controls are: \l BusyIndicator, \l DelayButton, \l Dialog, \l DialogButtonBox, - \l SelectionRectangle and \l Tumbler. Those will fall back to use the \l {Basic Style}. + The \l Tumbler control is not yet implemented for the iOS style and will fall back + to use the \l {Basic Style}. \section2 Customization diff --git a/src/quickcontrols/doc/src/qtquickcontrols-macos.qdoc b/src/quickcontrols/doc/src/qtquickcontrols-macos.qdoc index 97d79c6278..c024b7fb82 100644 --- a/src/quickcontrols/doc/src/qtquickcontrols-macos.qdoc +++ b/src/quickcontrols/doc/src/qtquickcontrols-macos.qdoc @@ -18,13 +18,7 @@ \note Be aware that the apperance of this style can change from one minor Qt version to the next, to better blend in with native applications on the platform. - \table - \row - \li \image qtquickcontrols-macos-light.png - \caption The macOS style in light theme - \li \image qtquickcontrols-macos-dark.png - \caption The macOS style in dark theme - \endtable + \include style-screenshots.qdocinc {file} {macOS} {macos} To run an application with the macOS style, see \l {Using Styles in Qt Quick Controls}. diff --git a/src/quickcontrols/doc/src/qtquickcontrols-material.qdoc b/src/quickcontrols/doc/src/qtquickcontrols-material.qdoc index 450cbb151c..4052337ef8 100644 --- a/src/quickcontrols/doc/src/qtquickcontrols-material.qdoc +++ b/src/quickcontrols/doc/src/qtquickcontrols-material.qdoc @@ -32,17 +32,11 @@ \section1 Detailed Description \target detailed-desc-material - The Material style is based on the \l {https://www.google.com/design/spec/material-design/introduction.html} + The Material style is based on the \l {https://m3.material.io} {Google Material Design Guidelines}. It allows for a unified experience across platforms and device sizes. - \table - \row - \li \image qtquickcontrols-material-light.png - \caption The Material style in light theme - \li \image qtquickcontrols-material-dark.png - \caption The Material style in dark theme - \endtable + \include style-screenshots.qdocinc {file} {Material} {material} To run an application with the Material style, see \l {Using Styles in Qt Quick Controls}. @@ -54,26 +48,43 @@ may occur due to differences in available system fonts and font rendering engines. + \note As the Material Design Guidelines change over time, this style may + change certain padding or font values, for example, in order to maintain + consistency with the guidelines. + \section2 Customization - The Material style allows customizing five attributes, \l {material-theme-attached-prop}{theme}, - \l {material-primary-attached-prop}{primary}, \l {material-accent-attached-prop}{accent}, - \l {material-foreground-attached-prop}{foreground}, and \l {material-background-attached-prop}{background}. + The Material style supports several customizable attributes. Some of these + attributes \l {QQuickAttachedPropertyPropagator}{propagate} to children in + the same manner as \l {Control::font}{fonts}: + + \list + \li \l {material-theme-attached-prop}{theme} + \li \l {material-primary-attached-prop}{primary} + \li \l {material-accent-attached-prop}{accent} + \li \l {material-foreground-attached-prop}{foreground} + \li \l {material-background-attached-prop}{background} + \endlist \image qtquickcontrols-material-attributes.png - All attributes can be specified for any window or item, and they automatically - propagate to children in the same manner as \l {Control::font}{fonts}. In the - following example, the window and all three radio buttons appear in the dark - theme using a purple accent color: + The remaining attributes do not propagate to children: + \list + \li \l {material-elevation-attached-prop}{elevation} + \li \l {material-roundedScale-attached-prop}{roundedScale} + \li \l {material-containerStyle-attached-prop}{containerStyle} + \endlist + + In the following example, the window and all three radio buttons appear in + the dark theme using a purple accent color: \table \row \li \qml - import QtQuick 2.12 - import QtQuick.Controls 2.12 - import QtQuick.Controls.Material 2.12 + import QtQuick + import QtQuick.Controls + import QtQuick.Controls.Material ApplicationWindow { visible: true @@ -84,9 +95,16 @@ Column { anchors.centerIn: parent - RadioButton { text: qsTr("Small") } - RadioButton { text: qsTr("Medium"); checked: true } - RadioButton { text: qsTr("Large") } + RadioButton { + text: qsTr("Small") + } + RadioButton { + text: qsTr("Medium") + checked: true + } + RadioButton { + text: qsTr("Large") + } } } \endqml @@ -95,8 +113,8 @@ \endtable In addition to specifying the attributes in QML, it is also possible to - specify them via environment variables or in a configuration file. Attributes - specified in QML take precedence over all other methods. + specify some of them via environment variables or in a configuration file. + Attributes specified in QML take precedence over all other methods. \section3 Configuration File @@ -227,9 +245,34 @@ Note that the heights shown above may vary based on differences in fonts across platforms. + \section2 Control-Specific Notes + + \target material-control-specific-notes-textarea + \section3 TextArea + + TextArea supports two + \l {material-containerStyle-attached-prop}{containerStyles}: \c Filled and + \c Outlined. Outlined TextAreas have floating placeholder text that sits at + the top of the control. This requires the placeholder text to go outside + the bounds of the control, which can cause it to be + clipped when the TextArea or the Flickable it's a child of sets + \l {Item::}{clip} to \c true. To avoid this, \l {Control::}{topInset} is + set to an appropriate value in these cases. + + \include qquickmaterialstyle.qdocinc placeholder-text-multiple-lines + + \section3 TextField + + The same \l {material-control-specific-notes-textarea}{issue with clipping} + explained above for TextArea can also occur with \l TextField. To avoid + this, \l {Control::}{topInset} is set to an appropriate value when the + TextField sets clip to \c true. + + \include qquickmaterialstyle.qdocinc placeholder-text-multiple-lines + \section1 Attached Property Documentation - \styleproperty {Material.accent} {color} {material-accent-attached-prop} + \styleproperty {Material.accent} {color} \target material-accent-attached-prop This attached property holds the accent color of the theme. The property can be attached to any window or item. The value is propagated to children. @@ -253,7 +296,7 @@ \endstyleproperty - \styleproperty {Material.background} {color} {material-background-attached-prop} + \styleproperty {Material.background} {color} \target material-background-attached-prop This attached property holds the background color of the theme. The property can be attached to any window or item. The value is propagated to children. @@ -273,17 +316,18 @@ \endstyleproperty - \styleproperty {Material.elevation} {int} {material-elevation-attached-prop} + \styleproperty {Material.elevation} {int} \target material-elevation-attached-prop This attached property holds the elevation of the control. The higher the elevation, the deeper the shadow. The property can be attached to any control, - but not all controls visualize elevation. + but not all controls visualize elevation. The value is not propagated to + children. The default value is control-specific. In the following example, the elevation of the pane is set to \c 6 in order to achieve the look of an - \l {https://material.google.com/components/cards.html}{elevated card}: + \l {https://m3.material.io/components/cards/overview}{elevated card}: \table \row @@ -295,7 +339,7 @@ \endstyleproperty - \styleproperty {Material.foreground} {color} {material-foreground-attached-prop} + \styleproperty {Material.foreground} {color} \target material-foreground-attached-prop This attached property holds the foreground color of the theme. The property can be attached to any window or item. The value is propagated to children. @@ -315,7 +359,7 @@ \endstyleproperty - \styleproperty {Material.primary} {color} {material-primary-attached-prop} + \styleproperty {Material.primary} {color} \target material-primary-attached-prop This attached property holds the primary color of the theme. The property can be attached to any window or item. The value is propagated to children. @@ -330,7 +374,7 @@ \endstyleproperty - \styleproperty {Material.theme} {enumeration} {material-theme-attached-prop} + \styleproperty {Material.theme} {enumeration} \target material-theme-attached-prop This attached property holds whether the theme is light or dark. The property can be attached to any window or item. The value is propagated to children. @@ -357,11 +401,12 @@ \endstyleproperty - \styleproperty {Material.roundedScale} {enumeration} {material-roundedScale-attached-prop} + \styleproperty {Material.roundedScale} {enumeration} \target material-roundedScale-attached-prop This attached property holds the radius of rounded corners used on the target control. The property can be attached to any window or item, but - only some controls support it. + only some controls support it. The value is not propagated to + children. The default value is control-specific. @@ -380,17 +425,18 @@ \endstyleproperty - \styleproperty {Material.containerStyle} {enumeration} {material-containerStyle-attached-prop} + \styleproperty {Material.containerStyle} {enumeration} \target material-containerStyle-attached-prop This attached property holds the style of the container used by the target control. The property can be attached to any window or item, but - only TextField and TextArea support it by default. + only TextField and TextArea support it by default. The value is not + propagated to children. The default value is control-specific. - Available scales: - \value Material.Filled Square corners - \value Material.Outlined Extra small rounded corners + Available styles: + \value Material.Filled Use the filled container variant if available + \value Material.Outlined Use the outlined container variant if available This property was added in Qt 6.5. @@ -400,7 +446,7 @@ \section1 Attached Method Documentation - \stylemethod2 {color} {color} {enumeration} {predefined} {enumeration} {shade} {material-color-attached-method} + \stylemethod2 {color} {color} {enumeration} {predefined} {enumeration} {shade} \target material-color-attached-method This attached method returns the effective color value of the specified \l {pre-defined Material colors}{pre-defined Material color} combined with diff --git a/src/quickcontrols/doc/src/qtquickcontrols-styles.qdoc b/src/quickcontrols/doc/src/qtquickcontrols-styles.qdoc index 351732c9a3..38174ab09a 100644 --- a/src/quickcontrols/doc/src/qtquickcontrols-styles.qdoc +++ b/src/quickcontrols/doc/src/qtquickcontrols-styles.qdoc @@ -11,38 +11,44 @@ \section2 Basic Style - \image qtquickcontrols-basic-thumbnail.png + \image qtquickcontrols-basic.png + The \l {Basic Style} is a simple and light-weight all-round style that offers the maximum performance for Qt Quick Controls. \section2 Fusion Style - \image qtquickcontrols-fusion-thumbnail.png + \include style-screenshots.qdocinc {file} {Fusion} {fusion} + The \l {Fusion Style} is a platform-agnostic style that offers a desktop-oriented look and feel for Qt Quick Controls. \section2 Imagine Style - \image qtquickcontrols-imagine-thumbnail.png + \image qtquickcontrols-imagine.png + The \l {Imagine Style} is based on image assets. The style comes with a default set of images which can easily be changed by providing a directory with images using a predefined naming convention. \section2 macOS Style - \image qtquickcontrols-macos-thumbnail.png + \include style-screenshots.qdocinc {file} {macOS} {macos} + The \l {macOS Style} is a native-looking style for macOS. \note this style is only available for applications running on macOS. - \section2 iOS Style + \include style-screenshots.qdocinc {file} {iOS} {ios} + The \l {iOS Style} is a native-looking style for iOS based on image assets. \note this style is only available for applications running on iOS. \section2 Material Style - \image qtquickcontrols-material-thumbnail.png + \include style-screenshots.qdocinc {file} {Material} {material} + The \l {Material Style} offers an appealing design based on the \l {https://www.google.com/design/spec/material-design/introduction.html} {Google Material Design Guidelines}, but requires more system resources than @@ -50,14 +56,16 @@ \section2 Universal Style - \image qtquickcontrols-universal-thumbnail.png + \include style-screenshots.qdocinc {file} {Universal} {universal} + The \l {Universal Style} offers an appealing design based on the \l {https://dev.windows.com/design}{Microsoft Universal Design Guidelines}, but requires more system resources than the Basic style. \section2 Windows Style - \image qtquickcontrols-windows-thumbnail.png + \image qtquickcontrols-windows.png + The \l {Windows Style} is a native-looking style for Windows. \note this style is only available for applications running on Windows. @@ -101,12 +109,19 @@ import QtQuick.Controls.Basic auto \endcode - The benefit of compile-time style selection is that the QtQuick.Controls plugin - is not used and therefore does not need to be deployed with the application. + The benefit of compile-time style selection is that the + \l {The QML script compiler}{QML compiler} knows which specific style + is in use and can generate C++ code for bindings. + + Another benefit is that the QtQuick.Controls plugin is not used and + therefore does not need to be deployed with the application. Explicit imports are also necessary if your application is built \l {Static Builds}{statically}. + A disadvantage of compile-time style selection is that one executable + cannot support multiple styles, as each style requires its own. + \section2 Run-Time Style Selection Run-time style selection is a way of specifying a style to use by importing @@ -116,24 +131,44 @@ import QtQuick.Controls \endqml - The QtQuick.Controls plugin will import the style and fallback - style that were set at runtime via one of the following approaches: + The QtQuick.Controls plugin will import the style that was set at runtime + via one of the following approaches: \list \li \l[CPP]{QQuickStyle::setStyle()} \li The \c -style command line argument - \li The \c QT_QUICK_CONTROLS_STYLE environment variable - \li The \c qtquickcontrols2.conf configuration file + \li The \l {Supported Environment Variables in Qt Quick Controls} + {QT_QUICK_CONTROLS_STYLE environment variable} + \li The \l {Qt Quick Controls Configuration File}{qtquickcontrols2.conf + configuration file} \endlist The priority of these approaches follows the order they are listed, from highest to lowest. That is, using \c QQuickStyle to set the style will always take priority over using the command line argument, for example. + Similarly, the fallback style can be set via one of the following methods: + \list + \li \l[CPP]{QQuickStyle::setFallbackStyle()} + \li The \l {Supported Environment Variables in Qt Quick Controls} + {QT_QUICK_CONTROLS_FALLBACK_STYLE environment variable} + \li The \l {Qt Quick Controls Configuration File}{qtquickcontrols2.conf + configuration file} + \endlist + + \note you can only dynamically choose the fallback style if it hasn't been + chosen statically in the main style's qmldir file. + The benefit of run-time style selection is that a single application binary can support multiple styles, meaning that the end user can choose which style to run the application with. + A disadvantage of this approach is that \l {The QML script compiler} + {QML compiler} can't know which specific style is in use and therefore + cannot generate C++ code for bindings on properties of Qt Quick Controls + types. This does not affect the QML compiler's abilities to generate C++ + for bindings on types from other modules. + \section3 Using QQuickStyle in C++ \l[CPP]{QQuickStyle} provides C++ API for configuring a specific diff --git a/src/quickcontrols/doc/src/qtquickcontrols-universal.qdoc b/src/quickcontrols/doc/src/qtquickcontrols-universal.qdoc index 4c8db816d7..eba367061f 100644 --- a/src/quickcontrols/doc/src/qtquickcontrols-universal.qdoc +++ b/src/quickcontrols/doc/src/qtquickcontrols-universal.qdoc @@ -33,13 +33,7 @@ The Universal style has been designed to look good on all devices, from phones and tablets to PCs. - \table - \row - \li \image qtquickcontrols-universal-light.png - \caption The Universal style in light theme - \li \image qtquickcontrols-universal-dark.png - \caption The Universal style in dark theme - \endtable + \include style-screenshots.qdocinc {file} {Universal} {universal} To run an application with the Universal style, see \l {Using Styles in Qt Quick Controls}. @@ -152,7 +146,7 @@ \section1 Attached Property Documentation - \styleproperty {Universal.accent} {color} {universal-accent-attached-prop} + \styleproperty {Universal.accent} {color} \target universal-accent-attached-prop This attached property holds the accent color of the theme. The property can be attached to any window or item. The value is propagated to children. @@ -176,7 +170,7 @@ \endstyleproperty - \styleproperty {Universal.background} {color} {universal-background-attached-prop} + \styleproperty {Universal.background} {color} \target universal-background-attached-prop This attached property holds the background color of the theme. The property can be attached to any window or item. The value is propagated to children. @@ -196,7 +190,7 @@ \endstyleproperty - \styleproperty {Universal.foreground} {color} {universal-foreground-attached-prop} + \styleproperty {Universal.foreground} {color} \target universal-foreground-attached-prop This attached property holds the foreground color of the theme. The property can be attached to any window or item. The value is propagated to children. @@ -214,7 +208,7 @@ \image qtquickcontrols-universal-foreground.png \endtable - \styleproperty {Universal.theme} {enumeration} {universal-theme-attached-prop} + \styleproperty {Universal.theme} {enumeration} \target universal-theme-attached-prop This attached property holds whether the theme is light or dark. The property can be attached to any window or item. The value is propagated to children. @@ -243,7 +237,7 @@ \section1 Attached Method Documentation - \stylemethod {color} {color} {enumeration} {predefined} {color-attached-method} + \stylemethod {color} {color} {enumeration} {predefined} \target color-attached-method This attached method returns the effective color value of the specified \l {pre-defined Universal colors}{pre-defined Universal color}. diff --git a/src/quickcontrols/doc/src/qtquickcontrols-windows.qdoc b/src/quickcontrols/doc/src/qtquickcontrols-windows.qdoc index fee2ffa98f..dd14b45f90 100644 --- a/src/quickcontrols/doc/src/qtquickcontrols-windows.qdoc +++ b/src/quickcontrols/doc/src/qtquickcontrols-windows.qdoc @@ -29,9 +29,9 @@ \section2 Current state - The Windows style is under development, and some controls are not yet supported. Those - controls are: \l BusyIndicator, \l DelayButton, \l PageIndicator, \l RangeSlider, \l Switch, \l TabBar and - \l Tumbler. Those will fall back to use the \l {Fusion Style}. + The Windows style is under development, and some controls are not yet supported. Those controls + are: \l BusyIndicator, \l DelayButton, \l Menu, \l MenuBar, \l PageIndicator, \l RangeSlider, + \l Switch, \l TabBar and \l Tumbler. Those will fall back to use the \l {Fusion Style}. \section2 Customization |