aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2022-01-05 15:42:36 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-02-16 03:33:49 +0000
commitd407b5d2cbd0cf54cf3916917f5337148bccc9df (patch)
treecefad3844aecd76add4ae0a1e985d174c14f5ec5
parentaed6e94b00a519b166a8dca5a755a2fa47e69640 (diff)
Document that all required types must be implemented by custom styles
For example, it's not possible to customize only ScrollBar and have ScrollView pick those changes up automatically; you must also implement ScrollBar. Task-number: QTBUG-99367 Change-Id: Ie487b0b947fa936e56b5d8e473fbb66287b51c68 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit ce271b1bdf255059f5cc2efe62042508498d1ffa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/quickcontrols2/doc/src/qtquickcontrols2-customize.qdoc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/quickcontrols2/doc/src/qtquickcontrols2-customize.qdoc b/src/quickcontrols2/doc/src/qtquickcontrols2-customize.qdoc
index 6fa4447c83..3222eabf10 100644
--- a/src/quickcontrols2/doc/src/qtquickcontrols2-customize.qdoc
+++ b/src/quickcontrols2/doc/src/qtquickcontrols2-customize.qdoc
@@ -321,6 +321,14 @@
it's important not to import \c {QtQuick.Controls}. Doing so will
prevent the QML from being compiled by the QML compiler.
+ \section4 Implement types used by other types
+
+ Suppose you were using ScrollViews in your application, and decided that
+ you want to customize their scroll bars. It is tempting to just implement a
+ custom ScrollBar.qml and have ScrollView pick up the customized ScrollBar
+ automatically. However, this will not work. You must implement both
+ ScrollBar.qml \e and ScrollView.qml.
+
\section3 Attached properties
It is common for a style to have certain properties or attributes that