Details
-
Bug
-
Resolution: Incomplete
-
P3: Somewhat important
-
None
-
5.1.0
-
None
Description
Users of Qt applications can choose the platform plugin and the application style using either command line arguments or environment variables:
$ ./app -platform xcb -style fusion $ QT_QPA_PLATFORM=xcb QT_STYLE_OVERRIDE=fusion ./app
However, there's no way to control the platform theme that provides natives dialogs and so on. Ideally there should be no need for that, but platforms may provide several themes (like on XCB we have KDE, GTK & generic) and the desktop environment detection routines in Qt are not perfect since they rely on XDG_CURRENT_DESKTOP/DESKTOP_SESSION environment variables that might or might not be correctly set. Therefore there should be a way to control the platform theme. Here are some ideas:
Perhaps we could combine it to the existing platform parameter and environment variables:
$ ./app -platform xcb:gtk $ QT_QPA_PLATFORM=xcb:gtk ./app
Or just provide new ones:
$ ./app -platform xcb -platformtheme gtk $ QT_QPA_PLATFORM=xcb QT_QPA_PLATFORMTHEME=gtk ./app