diff --git a/src/main/main.cpp b/src/main/main.cpp index 0875c530..975b42cf 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -177,8 +177,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