Skip to content

Commit

Permalink
Use the "Round" HiDPI scaling policy (the default in Qt5) in Qt6
Browse files Browse the repository at this point in the history
As of Qt 6.7.2 the rendering is completely broken and full of various render
artifacts when the default "PassThrough" policy is used and the user has
a fractional screen size like 125% set.
  • Loading branch information
tumic0 committed Sep 21, 2024
1 parent 23c398c commit 225e6da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ int main(int argc, char *argv[])
qRegisterMetaTypeStreamOperators<TimeZoneInfo>("TimeZoneInfo");
#else // QT6
qRegisterMetaType<TimeZoneInfo>("TimeZoneInfo");
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(
Qt::HighDpiScaleFactorRoundingPolicy::Round);
#endif // QT6

QSurfaceFormat fmt;
Expand Down

0 comments on commit 225e6da

Please sign in to comment.