solitare/main.cpp

24 lines
591 B
C++
Raw Normal View History

2024-11-30 18:23:45 +00:00
#include <QGuiApplication>
#include <QQmlApplicationEngine>
2024-12-01 18:43:49 +00:00
#include <QQmlContext>
2024-12-01 21:40:42 +00:00
#include "gamestate.h"
2024-11-30 18:23:45 +00:00
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
QObject::connect(
&engine,
&QQmlApplicationEngine::objectCreationFailed,
&app,
[]() { QCoreApplication::exit(-1); },
Qt::QueuedConnection);
2024-12-01 18:43:49 +00:00
2024-12-03 14:32:30 +00:00
auto gameState = engine.singletonInstance<GameState*>("Solitare", "GameState");
gameState->setupWinningDeck();
2024-12-01 18:43:49 +00:00
2024-11-30 18:23:45 +00:00
engine.loadFromModule("Solitare", "Main");
return app.exec();
}