highDPI: Qt5 set AA_EnableHighDpiScaling.

This commit is contained in:
2025-06-25 23:49:40 +08:00
parent c7b15694b9
commit b63048ecae
3 changed files with 7 additions and 1 deletions

View File

@@ -25,6 +25,10 @@ int main(int argc, char* argv[])
SingleApplication a(argc, argv);
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
#ifdef _WIN32
QFont font("Microsoft YaHei", 9);
a.setFont(font);