Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Difference between QQmlApplicationEngine and QtQuick2ApplicationViewer

$
0
0
I started developing my app with Qt 5.1. So I created a new QtQuick Application with the QtCreator wizard. The Application is started with the following code in main.cpp: #include <QtGui/QGuiApplication> #include "qtquick2applicationviewer.h"   int main(int argc, char *argv[]) {     QGuiApplication app(argc, argv);       QtQuick2ApplicationViewer viewer;     viewer.setMainQmlFile(QStringLiteral("qml/MyApp/main.qml"));     viewer.showExpanded();       return app.exec(); } Now with Qt 5.3 I created a new QtQuick Application with the QtCreator wizard and the startup process has changed in main.cpp: #include <QGuiApplication> #include <QQmlApplicationEngine>   int main(int argc, char *argv[]) {     QGuiApplication app(argc, argv);       QQmlApplicationEngine engine;     engine.load(QUrl(QStringLiteral("qrc:///main.qml")));       return app.exec(); } Are there any important differences between the startup strategies, like performance impacts? My Application runs on Android, if that matters.

Viewing all articles
Browse latest Browse all 4972

Trending Articles