QScreen: Add a note to use QWindow::devicePixelRatio if possible
Like QGuiApplication does as well. Also add a note that screen and window DPR can be different. Pick-to: 6.8 Change-Id: I1a24cf7f11e945187da9dce4421039350e811997 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 97049278443860d3dd1b1efd20d1f7dabaf72a35) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
5ca7ad268a
commit
281c45452b
@ -281,6 +281,10 @@ qreal QScreen::logicalDotsPerInch() const
|
||||
Common values are 1.0 on normal displays and 2.0 on "retina" displays.
|
||||
Higher values are also possible.
|
||||
|
||||
\note On some platforms the devicePixelRatio of a window and the screen it is on can
|
||||
be different. Use this function only when you don't know which window you are targeting.
|
||||
If you do know the target window, use QWindow::devicePixelRatio() instead.
|
||||
|
||||
\sa QWindow::devicePixelRatio(), QGuiApplication::devicePixelRatio()
|
||||
*/
|
||||
qreal QScreen::devicePixelRatio() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user