harbour-tooter/src/harbour-tooter.cpp

25 lines
651 B
C++
Raw Normal View History

2017-06-01 17:13:51 +03:00
#ifdef QT_QML_DEBUG
#include <QtQuick>
#endif
2017-06-01 17:13:51 +03:00
#include <sailfishapp.h>
2017-07-06 01:59:00 +03:00
#include "imageuploader.h"
2017-06-01 17:13:51 +03:00
int main(int argc, char *argv[])
{
2017-07-06 01:59:00 +03:00
QScopedPointer<QGuiApplication> app(SailfishApp::application(argc, argv));
QScopedPointer<QQuickView> view(SailfishApp::createView());
//QQmlContext *context = view.data()->rootContext();
2017-07-06 01:59:00 +03:00
qmlRegisterType<ImageUploader>("harbour.tooter.Uploader", 1, 0, "ImageUploader");
QQmlEngine* engine = view->engine();
QObject::connect(engine, SIGNAL(quit()), app.data(), SLOT(quit()));
2017-06-01 17:13:51 +03:00
2017-07-06 01:59:00 +03:00
view->setSource(SailfishApp::pathTo("qml/harbour-tooter.qml"));
view->show();
return app->exec();
2017-06-01 17:13:51 +03:00
}