Skip to content

Instantly share code, notes, and snippets.


Nicd/main.cpp Secret

Created Nov 30, 2013
What would you like to do?
#include <QtQuick>
#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);
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.