#include #include #include #include #include #include #include #include int main(int argc, char *argv[]) { QApplication app(argc, argv); QQuickView view; qmlRegisterUncreatableType("org.semlanik.nicegit", 1, 0, "GitHandler", "Global for qml"); qmlRegisterUncreatableType("org.semlanik.nicegit", 1, 0, "GitRepository", "Owned only by GitHandler"); qmlRegisterUncreatableType("org.semlanik.nicegit", 1, 0, "RepositoryModel", "Owned only by GitHandler"); GitHandler handler; handler.open("/home/semlanik/Projects/testrepo/"); view.rootContext()->setContextProperty("_handler", &handler); view.setSource(QUrl("qrc:/qml/MainView.qml")); view.showMaximized(); return app.exec(); }