mirror of https://github.com/qt/qtdoc.git
Explain that qmlscene automatically creates windows for bare Items
Fixes: QTBUG-81963
Change-Id: I6cb597cdebdbdae04bb0b16d193898b83ed236a9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit efb4d6bfd8
)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
d089c60dfd
commit
fc94e5c5cf
|
@ -52,7 +52,14 @@
|
|||
applications, and not as a launcher in a production environment.
|
||||
To launch a QML application in a production environment, develop a custom
|
||||
C++ application or bundle the QML file in a module. See \l {Deploying QML
|
||||
applications} for more information.
|
||||
applications} for more information. When given a bare \l Item as root
|
||||
element, \c qmlscene will automatically create a window to show the scene.
|
||||
Notably, \l QQmlComponent::create() will not do such a thing. Therefore,
|
||||
when moving from a prototype developed with \c qmlscene to a C++
|
||||
application, you need to either make sure the root element is a
|
||||
\l Window or manually create a window using QtQuick's C++ API. On the flip
|
||||
side, the ability to automatically create a window gives you the option to
|
||||
load parts of your prototype separately with \c qmlscene.
|
||||
|
||||
To load a .qml file, run the tool and select the file to be opened, or
|
||||
provide the file path on the command prompt:
|
||||
|
|
Loading…
Reference in New Issue