summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-07-27 12:48:03 +0200
committerPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-07-30 14:43:57 +0000
commit60b08171aee1c33fe51cec4426709813d21c4770 (patch)
treea43007558d19d97409d1b5893661bae2d78492cf /doc/src
parent36da44440e2516d8d2c56bb50a7620fb464fa7a7 (diff)
downloadqtdoc-60b08171aee1c33fe51cec4426709813d21c4770.tar.gz
Updated highDPI docs to 5.6
Change-Id: I09e6f39d0caedf0c06b0f7e3d46d1de61867f826 Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/highdpi.qdoc48
1 files changed, 41 insertions, 7 deletions
diff --git a/doc/src/highdpi.qdoc b/doc/src/highdpi.qdoc
index cc9bd290..d8fb4e44 100644
--- a/doc/src/highdpi.qdoc
+++ b/doc/src/highdpi.qdoc
@@ -124,21 +124,55 @@
\li Ability to provide pixmaps or artwork for high resolution:
see \l{Drawing High Resolution Versions of Pixmaps and Images}.
- \li Qt 5.4 introduces experimental support for scaling by by device pixel ratio
- similar to OS X to the platform plugins for Windows and Unix (XCB).
- This is controlled by the environment variable \c QT_DEVICE_PIXEL_RATIO.
- It can be set to a numerical value to be used as scale factor or \c "auto"
- which causes the scale factor to be determined by checking the monitor size.
+ \li Qt 5.6 supports cross-platform high-DPI scaling for legacy applications,
+ similar to the scaling done natively by OS X. This allows applications written
+ for low-DPI screens to run unchanged on high-DPI devices. This feature is
+ opt-in, and can be enabled by the following environment variables:
+ \list
+
+ \li \c QT_AUTO_SCREEN_SCALE_FACTOR [boolean] enables automatic scaling,
+ based on the pixel density of the monitor. This will not change the size
+ of point sized fonts, since point is a physical unit of measure. Multiple
+ screens may get different scale factors.
+
+ \li \c QT_SCALE_FACTOR [numeric] defines a global scale
+ factor for the whole application, including point sized fonts.
+
+ \li \c QT_SCREEN_SCALE_FACTORS [list] specifies scale factors
+ for each screen. This will not change the size
+ of point sized fonts. This environment variable is
+ mainly useful for debugging, or to work around monitors with wrong
+ \l {https://en.wikipedia.org/wiki/Extended_Display_Identification_Data}
+ {EDID information}(Extended Display Identification Data).
+
+ The format can be either a semicolon-separated list of scale
+ factors in the same order as QGuiApplication::screens(), or a
+ semicolon-separated list of \c name=value pairs, where \c
+ name is the same as QScreen::name().
+
+ \endlist
It is recommended to use the \c Fusion style.
- \endlist
+
+ \note Non-integer scale factors may cause significant
+ scaling/painting artifacts.
+
+ \li The application attribute \c Qt::AA_NoHighDpiScaling, introduced in Qt 5.6,
+ turns off all scaling. This is intended for applications that need to use
+ actual window system coordinates, regardless of environment variables.
+
+ \li An experimental implementation of high-DPI scaling was introduced in Qt 5.4.
+ It was enabled by the environment variable \c QT_DEVICE_PIXEL_RATIO, which
+ could be set to a numerical scale factor or \c "auto". This variable is
+ deprecated in Qt 5.6.
+ \endlist
\section2 Migration of Existing Applications
In order to get an application designed for low DPI values running on a high
resolution monitors quickly, consider one of the scaling options (let the
application run as \e{DPI Unaware} on Windows or set the environment
- variable \c QT_DEVICE_PIXEL_RATIO to \c "auto". These options may incur
+ variable \c QT_AUTO_SCREEN_SCALE_FACTOR to \c "1". These options may incur
some scaling or painting artifacts, though.
In the longer term, the application should be adapted to run unmodified: