aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2019-06-20 21:24:22 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2019-06-20 21:24:22 +0300
commit099e4b9ad3d9967051d5c3d45c6315d1b30fea05 (patch)
treec38c3acc6751d167685ce8ff2518819192ff46b7 /src/qt
parent413e438ea9767710d4810c4400fd1242ca52cd1c (diff)
Set AA_EnableHighDpiScaling attribute early
Qt docs: This attribute must be set before QGuiApplication is constructed.
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoin.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 0c232f89fe..289985c828 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -436,16 +436,17 @@ int GuiMain(int argc, char* argv[])
Q_INIT_RESOURCE(bitcoin);
Q_INIT_RESOURCE(bitcoin_locale);
- BitcoinApplication app(*node, argc, argv);
// Generate high-dpi pixmaps
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#if QT_VERSION >= 0x050600
- QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
#ifdef Q_OS_MAC
QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
#endif
+ BitcoinApplication app(*node, argc, argv);
+
// Register meta types used for QMetaObject::invokeMethod
qRegisterMetaType< bool* >();
// Need to pass name here as CAmount is a typedef (see http://qt-project.org/doc/qt-5/qmetatype.html#qRegisterMetaType)