Skip to content

Commit

Permalink
Set QT_QPA_PLATFORM to xcb on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
smplayer-dev committed Jun 11, 2023
1 parent 23a177c commit a4dd195
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main.cpp
Expand Up @@ -58,6 +58,14 @@ QString hdpiConfig() {

int main( int argc, char ** argv )
{
#ifdef Q_OS_LINUX
#if QT_VERSION >= 0x050600
if (qgetenv("QT_QPA_PLATFORM").isEmpty()) {
qputenv("QT_QPA_PLATFORM", QByteArray("xcb"));
}
#endif
#endif

#ifdef HDPI_SUPPORT
QString hdpi_config_path = hdpiConfig();
HDPISupport * hdpi = 0;
Expand Down

0 comments on commit a4dd195

Please sign in to comment.