Which arguments are understood by Qt?
<This is actually a repost from qtcentre.org where I did not get any answer within 2 weeks>
When I look at the documentation of the class QCoreApplication/QApplication/QGuiAppication I always see a constructor with the arguments „(int & argc, char ** argv)“.
In the documentation of class QApplication I read that the following arguments are understood:
- -style <Style>
- -stylesheet <Stylesheet>
QGuiApplication lists the following arguments:
- -platform <PlatformName[ptions]>
- -platformpluginpath <Path>
- -platformtheme <PlatformTheme>
- -plugin <Plugin>
- -qwindowgeometry <Geometry>
- -qwindowtitle <Title>
- -session <Session>
- -display <X11-Display>
- -geometry <Geometry>
In the documentation of class QStyle I see a few style names and one explicit mentioned as an example: „-style windows“
I am wondering if there is some way in the program to retrieve all those options and present them in whatever form to the user, maybe something similar to the option --help/-h/-? which is used by many other programs. I am also wondering if and how a program can find out which styles are available, which themes and so on.
I would look in the source code for the Qt Designer. It allows you to generate a preview of your Widget/Dialog using a list of styles (on my machine 'Windows Style","Fusion Style", "Macintosh Style"). If this is something that is not hard coded in the program the answer should be there.
The help for Qt is clear on which styles are available for the different operating systems. You won't have "Machintosh Style" (aqua) on a Windows system for example.
For listing the available styles, you can ask QStyleFactory.
There is no pre-built creation of help output, though there are libraries for Qt to help out with that.