From 72ba4d1ff9c32ded860957b9426255659aacd4c9 Mon Sep 17 00:00:00 2001 From: Binhao Qian Date: Fri, 14 Feb 2025 02:09:38 +0800 Subject: [PATCH] Fix hidpi. --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 8060b4d3..8b20c2b9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -47,6 +47,11 @@ MainWindow* mainWindow; int main( int argc, char** argv ) { +#if QT_VERSION >= 0x050600 + /* Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created. */ + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +#endif + #if defined (USE_KDE) K4AboutData aboutdata ( "uChmViewer", QByteArray(),