Skip to content

Commit

Permalink
add version check ,high dpi support
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Apr 15, 2022
1 parent ed55ad0 commit cf9c657
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,10 @@ int main( int argc, char ** argv )
}

//high dpi screen support
#if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#endif
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);

Expand Down

0 comments on commit cf9c657

Please sign in to comment.