main: don't override user-provided QT_QPA_PLATFORM env variable

This commit is contained in:
xiphon 2020-10-28 00:56:21 +00:00
parent 33afd0bb83
commit 9b18344d23

View file

@ -179,8 +179,8 @@ int main(int argc, char *argv[])
// disable "QApplication: invalid style override passed" warning
if (isDesktop) qputenv("QT_STYLE_OVERRIDE", "fusion");
#ifdef Q_OS_LINUX
// force platform xcb
if (isDesktop) qputenv("QT_QPA_PLATFORM", "xcb");
// platform xcb by default
if (isDesktop && qEnvironmentVariableIsEmpty("QT_QPA_PLATFORM")) qputenv("QT_QPA_PLATFORM", "xcb");
#endif
// enable High DPI scaling