diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2019-06-20 21:24:22 +0300 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-06-24 09:02:05 -0400 |
commit | 715da91e917af106d8d77fb6240f2adf84bca292 (patch) | |
tree | e3aece7a6a6d8e9a1bf80c506707f39ac8870f2f /src | |
parent | 2800b3d5c14a9e5437b7e8838c69fdd6710908bb (diff) |
Set AA_EnableHighDpiScaling attribute early
Qt docs: This attribute must be set before QGuiApplication is
constructed.
Github-Pull: #16254
Rebased-From: 099e4b9ad3d9967051d5c3d45c6315d1b30fea05
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/bitcoin.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 1b063771ef..d2ac18f5a7 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -437,16 +437,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) |