mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-12 16:41:46 +00:00
Set AA_EnableHighDpiScaling attribute early
Qt docs: This attribute must be set before QGuiApplication is constructed. Github-Pull: #16254 Rebased-From: 099e4b9ad3d9967051d5c3d45c6315d1b30fea05
This commit is contained in:
parent
2800b3d5c1
commit
715da91e91
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user