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-15 14:03:37 +0000
commite23e006a35c8cb3e1003fcdbb963b4954579d7d3 (patch)
treef7bb7986b4a93acd1795ffc97a0fe7feb2cf8080
parent981140eba550f6aa67b0c408afa97f20e8fcb2b2 (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