Qt: Enable hi-dpi pixmaps

This commit is contained in:
Connor McLaughlin 2020-09-10 00:07:52 +10:00
parent 42107de50e
commit ad3e93dba4

View file

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