diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2022-02-17 18:46:30 +0100 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2022-02-24 12:16:41 +0100 |
commit | ee143fe27dfe2824dae5d8cbc1d1b799506e0f69 (patch) | |
tree | 7b9901c40c74ea4cd5199b47d490f7e0f4549289 /src/qml/qml/qqmlbuiltinfunctions.cpp | |
parent | 282c4eaf9327470f05e0f2822eac8fa86f2be994 (diff) |
qquickapplication: Add styleHints property
Implements a styleHints property to QQuickApplication for accessing QStyleHints
so it can be utilized in a way that's compatible with tooling and compilers.
[ChangeLog][QtQuick][New Feature] Qt.styleHints should now be accessed as
a property of QQuickApplication via Application.styleHints
Fixes: QTBUG-100993
Change-Id: I377c59072678a67d20f519cb5d329863111f295b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlbuiltinfunctions.cpp')
-rw-r--r-- | src/qml/qml/qqmlbuiltinfunctions.cpp | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/qml/qml/qqmlbuiltinfunctions.cpp b/src/qml/qml/qqmlbuiltinfunctions.cpp index 9213bd7c2d..565e0a085d 100644 --- a/src/qml/qml/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/qqmlbuiltinfunctions.cpp @@ -262,28 +262,12 @@ The following functions are also on the Qt object. \since 5.5 The \c styleHints object provides platform-specific style hints and settings. - See the QStyleHints documentation for further details. + See the \l QStyleHints documentation for further details. - \note The \c styleHints object is only available when using the Qt Quick module. - - The following example uses the \c styleHints object to determine whether an - item should gain focus on mouse press or touch release: - \code - import QtQuick 2.4 + You should access StyleHints via \l Application::styleHints instead. + See \l StyleHints for more details. - MouseArea { - id: button - - onPressed: { - if (!Qt.styleHints.setFocusOnTouchRelease) - button.forceActiveFocus() - } - onReleased: { - if (Qt.styleHints.setFocusOnTouchRelease) - button.forceActiveFocus() - } - } - \endcode + \note The \c styleHints object is only available when using the Qt Quick module. */ /*! |