aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/snippets
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/doc/snippets')
-rw-r--r--src/qml/doc/snippets/qmltc/tst_qmltc_examples.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/doc/snippets/qmltc/tst_qmltc_examples.cpp b/src/qml/doc/snippets/qmltc/tst_qmltc_examples.cpp
index 8c2706531b..12586013c4 100644
--- a/src/qml/doc/snippets/qmltc/tst_qmltc_examples.cpp
+++ b/src/qml/doc/snippets/qmltc/tst_qmltc_examples.cpp
@@ -51,6 +51,8 @@ void tst_qmltc_examples::app()
app.setApplicationDisplayName(QStringLiteral("This example is powered by qmltc!"));
QQmlEngine e;
+ // If the root element is Window, you don't need to create a Window.
+ // The snippet is for the cases where the root element is not a Window.
QQuickWindow window;
QScopedPointer<QmltcExample::myApp> documentRoot(
@@ -81,6 +83,8 @@ void tst_qmltc_examples::appComponent()
app.setApplicationDisplayName(QStringLiteral("This example is powered by QQmlComponent :("));
QQmlEngine e;
+ // If the root element is Window, you don't need to create a Window.
+ // The snippet is for the cases where the root element is not a Window.
QQuickWindow window;
QQmlComponent component(&e);