Qt5: Enabled HiDPI scaling and Use HiDPI Qt Pixmaps
* Enable HiDPI scaling on displays that support it on Qt 5.6 and later * Enable HiDPI Pixmaps on Qt 5.1 and later
This commit is contained in:
parent
69a9a0ca61
commit
61658e60ad
|
@ -1518,6 +1518,14 @@ void Application::runApplication(void)
|
|||
return;
|
||||
}
|
||||
|
||||
#if QT_VERSION >= 0x050600
|
||||
//Enable automatic scaling based on pixel density fo display (added in Qt 5.6)
|
||||
mainApp.setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
#endif
|
||||
#if QT_VERSION >= 0x050100
|
||||
//Enable support for highres images (added in Qt 5.1, but off by default)
|
||||
mainApp.setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
#endif
|
||||
// set application icon and window title
|
||||
it = cfg.find("Application");
|
||||
if (it != cfg.end()) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user