diff --git a/modules/highgui/src/window_QT.cpp b/modules/highgui/src/window_QT.cpp index f6ba44b425..d8f2271faa 100644 --- a/modules/highgui/src/window_QT.cpp +++ b/modules/highgui/src/window_QT.cpp @@ -529,6 +529,9 @@ static int icvInitSystem(int* c, char** v) //"For any GUI application using Qt, there is precisely one QApplication object" if (!QApplication::instance()) { +#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); +#endif new QApplication(*c, v); setlocale(LC_NUMERIC,"C");