aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/qml/qqmlapplicationengine.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlapplicationengine.cpp b/src/qml/qml/qqmlapplicationengine.cpp
index a2976b59c3..01670b91d3 100644
--- a/src/qml/qml/qqmlapplicationengine.cpp
+++ b/src/qml/qml/qqmlapplicationengine.cpp
@@ -301,6 +301,17 @@ void QQmlApplicationEngine::load(const QString &filePath)
Sets the \a initialProperties with which the QML component gets initialized after
it gets loaded.
+ \code
+ QQmlApplicationEngine engine;
+
+ EventDatabase eventDatabase;
+ EventMonitor eventMonitor;
+
+ engine.setInitialProperties({
+ { "eventDatabase", QVariant::fromValue(&eventDatabase) },
+ { "eventMonitor", QVariant::fromValue(&eventMonitor) }
+ });
+ \endcode
\sa QQmlComponent::setInitialProperties
\sa QQmlApplicationEngine::load