Commit f8954ab9 authored by Tobias Nätterlund's avatar Tobias Nätterlund Committed by Nicolas Arnaud-Cormos
Browse files

QNX: Fixed compilation for BlackBerry QtQuick2 template



Change-Id: I5c15c6c6ac69dbf46f676d4f330ed75a2f923c85
Reviewed-by: default avatarThomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@nokia.com>
Reviewed-by: Sean Harmer's avatarSean Harmer <sean.harmer@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos's avatarNicolas Arnaud-Cormos <nicolas@kdab.com>
parent 8d6566b6
#include <QWindow> #include <QGuiApplication>
#include <QtDeclarative>
#include <QQuickView> #include <QQuickView>
#include <QQmlEngine>
int main( int argc, char** argv ) int main( int argc, char** argv )
{ {
QGuiApplication app( argc, argv ); QGuiApplication app( argc, argv );
QWindow *window = 0; QQuickView view;
int exitCode = 0; view.setResizeMode( QQuickView::SizeRootObjectToView );
view.setSource( QUrl( "app/native/qml/main.qml" ) );
QQuickView* view = new QQuickView(); QObject::connect( view.engine(), SIGNAL( quit() ),
view->setResizeMode( QQuickView::SizeRootObjectToView ); QCoreApplication::instance(), SLOT( quit() ) );
view->setSource( QUrl( "app/native/qml/main.qml" ) ); view.show();
QDeclarativeEngine* engine = view->engine(); return app.exec();
QObject::connect( engine, SIGNAL(quit()),
QCoreApplication::instance(), SLOT(quit()) );
window = view;
window->showMaximized();
exitCode = app.exec();
delete window;
return exitCode;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment