Skip to content
Snippets Groups Projects
Select Git revision
  • f8540e131e0233f5cfe41742fa2dff10df154d7a
  • main default protected
  • gh-pages
  • new_data_processing
  • dev-lucas
5 results

README.md

Blame
  • main.cpp 632 B
    #include <QGuiApplication>
    #include <QQmlApplicationEngine>
    #include <QQmlContext>
    #include "WordChooser.h"
    #include <Qfile>
    
    
    int main(int argc, char *argv[])
    {
        QFile file(":/words_alpha.txt");
        QGuiApplication app(argc, argv);
    
        QQmlApplicationEngine engine;
    
        WordChooser wordChooser;
        engine.rootContext()->setContextProperty("wordChooser", &wordChooser);
    
        QObject::connect(
            &engine,
            &QQmlApplicationEngine::objectCreationFailed,
            &app,
            []() { QCoreApplication::exit(-1); },
            Qt::QueuedConnection);
    
        engine.loadFromModule("Motus", "Main");
    
        return app.exec();
    }