Skip to content

Instantly share code, notes, and snippets.

@Nicd

Nicd/main.cpp Secret

Created Nov 30, 2013
Embed
What would you like to do?
#ifdef QT_QML_DEBUG
#include <QtQuick>
#endif
#include <sailfishapp.h>
#include "uptimechecker.h"
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).
UptimeChecker checker;
QGuiApplication* uptime_app = SailfishApp::application(argc, argv);
QQuickView* window = SailfishApp::createView();
window->rootContext()->setContextProperty("checker", &checker);
window->show();
return uptime_app->exec();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.