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

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 <QtDeclarative>
#include <QGuiApplication>
#include <QQuickView>
#include <QQmlEngine>
int main( int argc, char** argv )
{
QGuiApplication app( argc, argv );
QWindow *window = 0;
int exitCode = 0;
QQuickView view;
view.setResizeMode( QQuickView::SizeRootObjectToView );
view.setSource( QUrl( "app/native/qml/main.qml" ) );
QQuickView* view = new QQuickView();
view->setResizeMode( QQuickView::SizeRootObjectToView );
view->setSource( QUrl( "app/native/qml/main.qml" ) );
QObject::connect( view.engine(), SIGNAL( quit() ),
QCoreApplication::instance(), SLOT( quit() ) );
view.show();
QDeclarativeEngine* engine = view->engine();
QObject::connect( engine, SIGNAL(quit()),
QCoreApplication::instance(), SLOT(quit()) );
window = view;
window->showMaximized();
exitCode = app.exec();
delete window;
return exitCode;
return app.exec();
}
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