Qt: Enable hi-dpi pixmaps

This commit is contained in:
Connor McLaughlin 2020-09-10 00:07:52 +10:00
parent 42107de50e
commit ad3e93dba4
1 changed files with 1 additions and 0 deletions

View File

@ -13,6 +13,7 @@ int main(int argc, char* argv[])
qRegisterMetaType<std::optional<bool>>(); qRegisterMetaType<std::optional<bool>>();
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#endif #endif