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. 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> (cherry picked from commit 281c45452b93b38d50b4c43a743017c5a1aa7cd1) Reviewed-by: David Redondo <qt@david-redondo.de>
This commit is contained in:
parent
3186048ffe
commit
752f16522d
@ -280,6 +280,10 @@ qreal QScreen::logicalDotsPerInch() const
|
|||||||
Common values are 1.0 on normal displays and 2.0 on "retina" displays.
|
Common values are 1.0 on normal displays and 2.0 on "retina" displays.
|
||||||
Higher values are also possible.
|
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()
|
\sa QWindow::devicePixelRatio(), QGuiApplication::devicePixelRatio()
|
||||||
*/
|
*/
|
||||||
qreal QScreen::devicePixelRatio() const
|
qreal QScreen::devicePixelRatio() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user