diff options
| author | Mitch Curtis <mitch.curtis@qt.io> | 2024-06-20 14:58:33 +0800 |
|---|---|---|
| committer | Mitch Curtis <mitch.curtis@qt.io> | 2024-08-12 10:20:34 +0800 |
| commit | 4f8f4aa99e5ceb22bbf275542b9c1e77b54b86c5 (patch) | |
| tree | 243a360525b47a406ec530f85c206357cd288fa5 /src/quickcontrols/doc/snippets | |
| parent | 053b51f8ba91550dd27bfaaf37e0cc3456be0af5 (diff) | |
Controls: replace Qt.styleHints with Application.styleHints
As mentioned in QTBUG-95540, using the latter provides better type
information for tooling, and avoids the "this property only exists on
the object if Quick has been imported" issue.
Replace QtQml import in Fluent style's Config.qml with QtQuick to
provide access to the Application type.
Fixes: QTBUG-126512
Change-Id: I4aac22e54f3b522f74acafd467ce22139352c9dd
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 9335b0fd1f2358110b88127c9b34fa6867a14069)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d70e645ca8071789e7d1906114b96ec36233179b)
(cherry picked from commit 2a40db4f99ca6ab02f55968a422172cebc4f10a9)
Diffstat (limited to 'src/quickcontrols/doc/snippets')
| -rw-r--r-- | src/quickcontrols/doc/snippets/qtquickcontrols-headerview.qml | 2 | ||||
| -rw-r--r-- | src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-pressandhold.qml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-headerview.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-headerview.qml index b8f6935010..9866e41e97 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-headerview.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-headerview.qml @@ -16,7 +16,7 @@ ApplicationWindow { 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 + color: Application.styleHints.appearance === Qt.Light ? palette.mid : palette.midlight HorizontalHeaderView { id: horizontalHeader diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-pressandhold.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-pressandhold.qml index e209ce9ce9..9857d3899a 100644 --- a/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-pressandhold.qml +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-pressandhold.qml @@ -9,7 +9,7 @@ Button { text: qsTr("Button") ToolTip.visible: pressed - ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval + ToolTip.delay: Application.styleHints.mousePressAndHoldInterval ToolTip.text: qsTr("This tool tip is shown after pressing and holding the button down.") } //! [1] |
