hidpi force auto

This commit is contained in:
Martin Rotter 2022-01-19 08:32:14 +01:00
parent 54244f9963
commit 157df7ca7a
1 changed files with 4 additions and 0 deletions

View File

@ -22,7 +22,11 @@ int main(int argc, char* argv[]) {
qSetMessagePattern(QSL("time=\"%{time process}\" type=\"%{type}\" -> %{message}")); qSetMessagePattern(QSL("time=\"%{time process}\" type=\"%{type}\" -> %{message}"));
// High DPI stuff. // High DPI stuff.
#if QT_VERSION >= 0x050E00 // Qt >= 5.14.0
qputenv("QT_ENABLE_HIGHDPI_SCALING", "1");
#else
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1"); qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
#endif
#if QT_VERSION_MAJOR <= 5 #if QT_VERSION_MAJOR <= 5
QApplication::setAttribute(Qt::ApplicationAttribute::AA_UseHighDpiPixmaps); QApplication::setAttribute(Qt::ApplicationAttribute::AA_UseHighDpiPixmaps);