diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-11-12 12:11:29 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-11-12 14:13:52 +0000 |
commit | 4ee1462686dc12eb463f5ba6b378d43a39aed074 (patch) | |
tree | 69f0a771341cf2f92bc86cea43b419586dcf5e4c /src/quick/items | |
parent | d27e0cc2a41c229c5b4085b2d78c4328a82baecd (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.cpp | 4 |
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 |