Skip to content

Commit

Permalink
Update main.cpp
Browse files Browse the repository at this point in the history
fix qt < 5.14
  • Loading branch information
jackjackphp authored Mar 26, 2024
1 parent 6abc2e7 commit ee4aa08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion example/QCefViewTest/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ main(int argc, char* argv[])
// so CEF will not scale the web content
// NOET: There is bugs in Qt 6.2.4, the HighDpi doesn't work
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#endif
#endif

// create QApplication instance
Expand Down

0 comments on commit ee4aa08

Please sign in to comment.