Skip to content

Commit

Permalink
Set AA_EnableHighDpiScaling attribute early
Browse files Browse the repository at this point in the history
Qt docs: This attribute must be set before QGuiApplication is 
constructed.
  • Loading branch information
hebasto committed Jun 20, 2019
1 parent 413e438 commit 099e4b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/qt/bitcoin.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit 099e4b9

Please sign in to comment.