Qt: Fix handling of display window size in hidpi

This commit is contained in:
Connor McLaughlin
2020-01-07 14:27:48 +10:00
parent 1b7be01507
commit 5076d7dfe8
7 changed files with 525 additions and 13 deletions

View File

@ -20,7 +20,10 @@ int main(int argc, char* argv[])
{
InitLogging();
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#endif
QApplication app(argc, argv);