From 0322dddbca7cb0024d2b01fcfa25f996788ba57d Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Tue, 30 Sep 2014 10:40:40 +0200 Subject: Document that QQmlApplicationEngine's root item must be a window. Change-Id: I22466e82105c9b56894a53400394d1124191f93d Reviewed-by: Robin Burchell --- src/qml/qml/qqmlapplicationengine.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/qml/qml/qqmlapplicationengine.cpp') diff --git a/src/qml/qml/qqmlapplicationengine.cpp b/src/qml/qml/qqmlapplicationengine.cpp index 56eddfa478..240c01233b 100644 --- a/src/qml/qml/qqmlapplicationengine.cpp +++ b/src/qml/qml/qqmlapplicationengine.cpp @@ -160,6 +160,10 @@ void QQmlApplicationEnginePrivate::_q_finishLoad(QObject *o) } \endcode + Unlike QQuickView, QQmlApplicationEngine does not automatically create a root + window. If you are using visual items from Qt Quick, you will need to place + them inside of a \l [QML] {Window}. + You can also use QCoreApplication with QQmlApplicationEngine, if you are not using any QML modules which require a QGuiApplication (such as \c QtQuick). List of configuration changes from a default QQmlEngine: @@ -167,7 +171,7 @@ void QQmlApplicationEnginePrivate::_q_finishLoad(QObject *o) \list \li Connecting Qt.quit() to QCoreApplication::quit() \li Automatically loads translation files from an i18n directory adjacent to the main QML file. - \li Automatically sets an incubuation controller if the scene contains a QQuickWindow. + \li Automatically sets an incubation controller if the scene contains a QQuickWindow. \li Automatically sets a \c QQmlFileSelector as the url interceptor, applying file selectors to all QML files and assets. \endlist -- cgit v1.2.3