diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-04-16 15:47:15 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-04-21 11:50:54 +0000 |
commit | a989e5c54fd2f97bd3fd9b9da9d2b677c64c7ea8 (patch) | |
tree | 6b0adaf6cf9c4408fcaadd8fdddd50fa00145f56 /src/gui | |
parent | 4d2b7e5f2e1e2c3dfe69eb600d330c398a999df9 (diff) |
Enhance QWindow::devicePixelRatio() docs
Document that fact that for non-create()'ed windows this is the
same as QGuiApplication::devicePixelRatio() which is the highest
dpr in the system. This has consequences when running with multiple
displays so application developer's have to be aware of this.
Change-Id: Ic05a18732ff021659da04428cb49421ac3453870
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index c0f953bcef..a1057691f2 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1075,6 +1075,10 @@ Qt::ScreenOrientation QWindow::contentOrientation() const Common values are 1.0 on normal displays and 2.0 on Apple "retina" displays. + \note For windows not backed by a platform window, meaning that create() was not + called, the function will fall back to QGuiApplication::devicePixelRatio() which in + turn returns the highest screen device pixel ratio found on the system. + \sa QScreen::devicePixelRatio(), QGuiApplication::devicePixelRatio() */ qreal QWindow::devicePixelRatio() const |