Merge pull request #4 from kvazar-network/fix-qt-dpi-warning

fix EnableHighDpiScaling init
This commit is contained in:
d47081 2024-03-29 06:17:28 +02:00 committed by GitHub
commit d8b3bf3ad3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -561,7 +561,6 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(bitcoin); Q_INIT_RESOURCE(bitcoin);
Q_INIT_RESOURCE(bitcoin_locale); Q_INIT_RESOURCE(bitcoin_locale);
BitcoinApplication app(argc, argv);
#if QT_VERSION > 0x050100 #if QT_VERSION > 0x050100
// Generate high-dpi pixmaps // Generate high-dpi pixmaps
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
@ -573,6 +572,8 @@ int main(int argc, char *argv[])
QApplication::setAttribute(Qt::AA_DontShowIconsInMenus); QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
#endif #endif
BitcoinApplication app(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)