cmake-gui: Enable High DPI scaling

This Qt flag enables UI scaling based on scale factor provided by the
operating system.  Only supported on versions of Qt >= 5.6.

The flag has no effect on macOS, where high DPI support is already
enabled as a setting in the bundle's info.plist.

Fixes: #17026
This commit is contained in:
Luis Caro 2017-09-15 15:28:38 +01:00 committed by Brad King
parent c0c5f924fe
commit 6fb36572dc

View File

@ -92,6 +92,10 @@ int main(int argc, char** argv)
cmAddPluginPath();
#endif
#if QT_VERSION >= 0x050600
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
QApplication app(argc, argv);
setlocale(LC_NUMERIC, "C");