diff options
| author | Alexei Cazacov <alexei.cazacov@qt.io> | 2024-09-16 09:47:38 +0300 |
|---|---|---|
| committer | Alexei Cazacov <alexei.cazacov@qt.io> | 2024-09-25 08:54:56 +0300 |
| commit | 1c7e8aa0f004b90293f41ec44df76aea594d2200 (patch) | |
| tree | f136e318f7d69f2906b263bf0dfa32051acea034 /src/qml/doc/snippets | |
| parent | 88e588b6bfe5a3daad619705521b4c9329114288 (diff) | |
Docs: Snippet update for QMLTC documentation
This commit adds a comment with the info on when the snippet
is applicable.
Task-number: QTBUG-127443
Pick-to: 6.8 6.7
Change-Id: Ia89df2334c32e58795f976072ec18775a8c0d2e8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/doc/snippets')
| -rw-r--r-- | src/qml/doc/snippets/qmltc/tst_qmltc_examples.cpp | 4 |
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); |
