Add CLI arguments parsing + --start-in-tray
- Loading a QML file in place of src/gui/UI.qml is now possible via -l / --load-qml instead of taking the first positional argument - New option to start application in tray without showing a window - --help and --version
This commit is contained in:
@@ -186,7 +186,9 @@ int main(int argc, char *argv[]) {
|
||||
QQmlContext *objectContext = new QQmlContext(engine.rootContext());
|
||||
|
||||
// To able to use Qt.quit() from QML side
|
||||
QObject::connect(&engine, &QQmlEngine::quit, &QApplication::quit);
|
||||
QObject::connect(
|
||||
&engine, &QQmlEngine::quit, &app, &QApplication::quit, Qt::QueuedConnection
|
||||
);
|
||||
|
||||
// Set the debugMode properties depending of if we're running in debug mode
|
||||
// or not (`qmake CONFIG+=dev ...`, default in autoreload.py)
|
||||
|
Reference in New Issue
Block a user