aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2022-10-31 10:50:56 +0800
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-11-01 17:47:47 +0000
commit2b0b1549f072d0b693f2ad97a55e480efb8db86c (patch)
treebdef0a0e8586da5e5ace9e47cac7b23d1495a4e0
parenta67c6aef5d0ae94563dd87d9658c594d145b6e7b (diff)
Doc: add notes for customization of the attached ToolTip control
To customize the attached ToolTip, it must be provided as part of the user's style. Task-number: QTBUG-107684 Change-Id: I8fd2c4c64ad7aad4b940031fb3638df211288903 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit e59c31c0afd128533bbe3edd93b516f0a693c221) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/quickcontrols2/doc/src/includes/qquicktooltip.qdocinc6
-rw-r--r--src/quickcontrols2/doc/src/qtquickcontrols2-customize.qdoc7
-rw-r--r--src/quicktemplates2/qquicktooltip.cpp2
3 files changed, 15 insertions, 0 deletions
diff --git a/src/quickcontrols2/doc/src/includes/qquicktooltip.qdocinc b/src/quickcontrols2/doc/src/includes/qquicktooltip.qdocinc
new file mode 100644
index 0000000000..0046a2d8b0
--- /dev/null
+++ b/src/quickcontrols2/doc/src/includes/qquicktooltip.qdocinc
@@ -0,0 +1,6 @@
+//! [customize-note]
+\note to customize the \l {Attached Tool Tips}{attached ToolTip}, it
+must be provided as part of
+\l {Creating a Custom Style}{your own style}. To do a one-off
+customization of a \c ToolTip, see \l {Custom Tool Tips}.
+//! [customize-note]
diff --git a/src/quickcontrols2/doc/src/qtquickcontrols2-customize.qdoc b/src/quickcontrols2/doc/src/qtquickcontrols2-customize.qdoc
index bd362270fc..616dbcc36c 100644
--- a/src/quickcontrols2/doc/src/qtquickcontrols2-customize.qdoc
+++ b/src/quickcontrols2/doc/src/qtquickcontrols2-customize.qdoc
@@ -85,6 +85,12 @@
An added benefit of these three methods is that it's not necessary to
implement the template from scratch.
+ \note the three approaches mentioned here do not work for customizing the
+ attached \l ToolTip, as that is a shared item created internally. To do
+ a one-off customization of a \c ToolTip, see \l {Custom Tool Tips}. To
+ customize the attached \c ToolTip, it must be provided as part of
+ \l {Creating a Custom Style}{your own style}.
+
\section1 Creating a Custom Style
There are several ways to go about creating your own styles. Below, we'll
@@ -1003,6 +1009,7 @@
\printuntil }
\printuntil }
+ \include qquicktooltip.qdocinc customize-note
\section2 Customizing Tumbler
diff --git a/src/quicktemplates2/qquicktooltip.cpp b/src/quicktemplates2/qquicktooltip.cpp
index 5ec4e00964..7703d57b53 100644
--- a/src/quicktemplates2/qquicktooltip.cpp
+++ b/src/quicktemplates2/qquicktooltip.cpp
@@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE
shown for the last item that made it visible. The position of the shared tool
tip is determined by the framework.
+ \include qquicktooltip.qdocinc customize-note
+
\section2 Delay and Timeout
Tool tips are typically transient in a sense that they are shown as a