From ffd68f2d472968b092957c40f3c46c9c70242126 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 2 Aug 2016 14:25:24 +0200 Subject: Doc: Explain how to support High DPI devices in applications Task-number: QTBUG-54114 Change-Id: I63ae6c47eb76a4acf85cd5b0c7adb21399a985dd Reviewed-by: Kai Koehne --- src/webengine/doc/src/qtwebengine-overview.qdoc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src') diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc index 3780e6288..ca9573709 100644 --- a/src/webengine/doc/src/qtwebengine-overview.qdoc +++ b/src/webengine/doc/src/qtwebengine-overview.qdoc @@ -203,6 +203,31 @@ If a proxy requires authentication, QWebEnginePage::proxyAuthenticationRequired is emitted. For Qt Quick, a dialog is shown. + \section1 High DPI Support + + To support High DPI devices, it is recommended that the application attribute + Qt::AA_EnableHighDpiScaling is set to enable automatic scaling based on the + pixel density of the monitor. In Qt WebEngine applications, the scaling + affects the default zooming factor and scrollbar size. + + For example: + + \code + int main(int argc, char *argv[]) + { + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + QApplication app(argc, argv); + // ... + } + \endcode + + Qt WebEngine bundles images for normal and high-dpi resolutions into + \e qtwebengine_resources_100p.pak and \e qtwebengine_resources_200p.pak + files. Depending on the target resolutions, one or both of these files need + to be deployed. + + For more information, see \l{High DPI Displays}. + \section1 Using WebEngine Core Qt WebEngine Core provides an API shared by Qt WebEngine and Qt WebEngine Widgets for handling -- cgit v1.2.3