+#if QT_VERSION >= 0x050600
+ // Check whether Qt will scale all GUI elements and accordingly
+ // set the scale factor so that to avoid blurred images and text
+ char const * const scale_factor = getenv("QT_SCALE_FACTOR");
+ if (scale_factor) {
+ qt_scale_factor = convert<double>(scale_factor);
+ if (qt_scale_factor < 1.0)
+ qt_scale_factor = 1.0;
+ }
+#endif
+