highui: qt - enable hidpi by default

can be overriden by environment:
QT_AUTO_SCREEN_SCALE_FACTOR=0
This commit is contained in:
Pavel Rojtberg 2022-02-12 14:56:42 +01:00
parent 19926e2979
commit 12ab54648c

View File

@ -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");