aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2020-11-12 12:11:29 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-11-12 14:13:52 +0000
commit4ee1462686dc12eb463f5ba6b378d43a39aed074 (patch)
tree69f0a771341cf2f92bc86cea43b419586dcf5e4c /src/quick/items
parentd27e0cc2a41c229c5b4085b2d78c4328a82baecd (diff)
QQuickView docs: show correct usage of setInitialProperties
Change-Id: If63f4c59f18bc0754ce2e68e424f6efd0f512d30 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 54d4f8f526f9c9a1af702b14925e1d34ee8b2134) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/quick/items')
-rw-r--r--src/quick/items/qquickview.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quick/items/qquickview.cpp b/src/quick/items/qquickview.cpp
index 97f6689d8a..b3a5270e9b 100644
--- a/src/quick/items/qquickview.cpp
+++ b/src/quick/items/qquickview.cpp
@@ -240,7 +240,11 @@ void QQuickView::setSource(const QUrl& url)
Sets the initial properties \a initialProperties with which the QML
component gets initialized after calling \l QQuickView::setSource().
+ \snippet qquickview-ex.cpp 1
+
\note You can only use this function to initialize top-level properties.
+ \note This function should always be called before setSource, as it has
+ no effect once the component has become \c Ready.
\sa QQmlComponent::createWithInitialProperties()
\since 5.14