Detect if application is running offscreen
-
wrote on 24 Jan 2019, 15:35 last edited by
Hi, for Qt applications you can pass
-platform offscreen
on the command line and it will start the program without a GUI.
How can I detect in my program, if it was started this way?QCommandLineParser
does not seem to "see" this passed option. -
Hi, for Qt applications you can pass
-platform offscreen
on the command line and it will start the program without a GUI.
How can I detect in my program, if it was started this way?QCommandLineParser
does not seem to "see" this passed option.@Magnus21
the platform plugin to load can also be set via env variable. in this case you wouldn't be able to catch it anyway using QCommandLineParser.QGuiApplication::platformName() reflects that though
-
wrote on 25 Jan 2019, 14:20 last edited by
Thanks that works perfectly
1/3