highui: qt - enable hidpi by default

can be overriden by environment:
QT_AUTO_SCREEN_SCALE_FACTOR=0
pull/21602/head
Pavel Rojtberg 3 years ago
parent 19926e2979
commit 12ab54648c
  1. 3
      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");

Loading…
Cancel
Save