1//这个是Windows平台⽤来获取屏幕宽度的代码,2//因为在qApplication实例初始化之前,QGuiApplication::screens();⽆法使⽤。3 qreal cx = GetSystemMetrics(SM_CXSCREEN);4 qreal scale = cx / 960; // 960 = 1920 / 2 5 qputenv("QT_SCALE_FACTOR", QString::number(scale).toLati...
测试例子如下: DATA: GO_ALV_DISPLAY TYPE REF TO IF_SALV_GUI_TABLE_IDA. DATA: GT_VISIBLE_...
另外一种办法就是写个文本文件qt.conf(Qt程序默认的标准配置文件,必须是这个名字),写入内容后,放到可执行文件同一目录即可,此方法采用操作系统的策略进行缩放,推荐此方法,虽然看起来稍微有点模糊,但不会出现发虚等问题,整体一致。 [Platforms] WindowsArguments = dpiawareness=0 没有完美的高分屏支持方法,都是只能...
Re the QT_AUTO_SCREEN_SCALE_FACTOR setting, I am not sure how to change it on Windows therefore I have not tried it. The behavior is probably due to the Qt limitation as in handling fractional scaling factors, a solution for it seems to be under development: https://bugreports.qt.io/...