Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(int argc, char *argv[])
- {
- // SailfishApp::main() will display "qml/template.qml", if you need more
- // control over initialization, you can use:
- //
- // - SailfishApp::application(int, char *[]) to get the QGuiApplication *
- // - SailfishApp::createView() to get a new QQuickView * instance
- // - SailfishApp::pathTo(QString) to get a QUrl to a resource file
- //
- // To display the view, call "show()" (will show fullscreen on device).
- QGuiApplication *app = SailfishApp::application(argc, argv);
- QQuickView *view = SailfishApp::createView();
- view->setSource(SailfishApp::pathTo("HelloSailfish.qml"));
- view->show();
- QObject *rootObject = view->rootObject();
- QQmlProperty answerProperty(rootObject, "answer");
- qDebug() << "answer = " << answerProperty.read();
- answerProperty.write(42);
- return app->exec();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement