aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-04-16 15:56:33 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-04-28 15:02:06 +0000
commite3f56a8b8d749f9eb4816ee7f6355f59dac173e6 (patch)
tree31678da718dad7ac048670aa4664831a1af0a69d /src
parent4da32851de3a1f462e1077fd9c59849863547af9 (diff)
Fix rendercontrol example for screens with different dpr
renderWindow() was not reimplemented in the example. This is pretty bad since renderWindowFor() fails to find a window and thus falls back to using the default device pixel ratio (which is the highest dpr present in the system). The result is broken content from Quick because it operates with a dpr of 2 any time a retina screen is connected, even when the example's own QWindow is placed on a normal screen. Add also a note to the QQuickRenderControl docs because it is easy to overlook. Task-number: QTBUG-45613 Change-Id: I31bf92ec285f3d9867a5604a4b4e3bea73791932 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquickrendercontrol.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/items/qquickrendercontrol.cpp b/src/quick/items/qquickrendercontrol.cpp
index e1ca662277..fd4787be98 100644
--- a/src/quick/items/qquickrendercontrol.cpp
+++ b/src/quick/items/qquickrendercontrol.cpp
@@ -367,6 +367,11 @@ void QQuickRenderControlPrivate::maybeUpdate()
If \a offset in non-null, it is set to the offset of the control
inside the window.
+
+ \note While not mandatory, reimplementing this function becomes essential for
+ supporting multiple screens with different device pixel ratios and properly positioning
+ popup windows opened from QML. Therefore providing it in subclasses is highly
+ recommended.
*/
/*!