diff options
Diffstat (limited to 'demo/main.cpp')
| -rw-r--r-- | demo/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/demo/main.cpp b/demo/main.cpp index 3100254..e0651d9 100644 --- a/demo/main.cpp +++ b/demo/main.cpp @@ -20,13 +20,19 @@ main (int argc, char *argv[]) QCommandLineParser parser; parser.addOption ({ "wire-debug", "Log raw wire TX/RX to dev log" }); + parser.addOption ({ "printheads", + "Number of simulated printheads (default 10)", "N", + "10" }); parser.addHelpOption (); parser.process (app); if (parser.isSet ("wire-debug")) Xpl2Client::enableWireDebug (); + int phCount = qBound (1, parser.value ("printheads").toInt (), 99); + QQmlApplicationEngine engine; + engine.setInitialProperties ({ { "demoPhCount", phCount } }); QObject::connect ( &engine, &QQmlApplicationEngine::objectCreationFailed, &app, [] () { QCoreApplication::exit (1); }, Qt::QueuedConnection); |
