Set AA_EnableHighDpiScaling attribute early
Qt docs: This attribute must be set before QGuiApplication is constructed.
This commit is contained in:
parent
413e438ea9
commit
099e4b9ad3
1 changed files with 3 additions and 2 deletions
|
@ -436,16 +436,17 @@ int GuiMain(int argc, char* argv[])
|
||||||
Q_INIT_RESOURCE(bitcoin);
|
Q_INIT_RESOURCE(bitcoin);
|
||||||
Q_INIT_RESOURCE(bitcoin_locale);
|
Q_INIT_RESOURCE(bitcoin_locale);
|
||||||
|
|
||||||
BitcoinApplication app(*node, argc, argv);
|
|
||||||
// Generate high-dpi pixmaps
|
// Generate high-dpi pixmaps
|
||||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
#if QT_VERSION >= 0x050600
|
#if QT_VERSION >= 0x050600
|
||||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
|
QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
BitcoinApplication app(*node, argc, argv);
|
||||||
|
|
||||||
// Register meta types used for QMetaObject::invokeMethod
|
// Register meta types used for QMetaObject::invokeMethod
|
||||||
qRegisterMetaType< bool* >();
|
qRegisterMetaType< bool* >();
|
||||||
// Need to pass name here as CAmount is a typedef (see http://qt-project.org/doc/qt-5/qmetatype.html#qRegisterMetaType)
|
// Need to pass name here as CAmount is a typedef (see http://qt-project.org/doc/qt-5/qmetatype.html#qRegisterMetaType)
|
||||||
|
|
Loading…
Reference in a new issue