path: root/src/gui/painting/qplatformbackingstore.h
diff options
authorLaszlo Agocs <>2015-06-01 11:44:37 +0200
committerLaszlo Agocs <>2015-06-01 13:38:14 +0000
commit78e335408303380310dd59fab421e495cf517ead (patch)
tree2c76bdaccd566792a23e766569043fc2800b2c2c /src/gui/painting/qplatformbackingstore.h
parent069be1654359ab93f89d339775795508d106153a (diff)
Clip QOpenGLWidget and QQuickWidget correctly
Introduce support for the widgets' clipRect(). Right now render-to-texture widgets in scroll areas placed close to each other result in broken (non-existent) clipping. Similarly, stack-on-top widgets fail to clip when placed inside a scroll area. This is now corrected and the qopenglwidget example is enhanced to utilize a scroll area. Task-number: QTBUG-45860 Change-Id: I859a63d61a50d64ba9e87244f83c5969dce12337 Reviewed-by: Jørgen Lind <>
Diffstat (limited to 'src/gui/painting/qplatformbackingstore.h')
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/painting/qplatformbackingstore.h b/src/gui/painting/qplatformbackingstore.h
index ae7314b6d0..5fa7e6dac0 100644
--- a/src/gui/painting/qplatformbackingstore.h
+++ b/src/gui/painting/qplatformbackingstore.h
@@ -82,12 +82,14 @@ public:
bool isEmpty() const { return count() == 0; }
GLuint textureId(int index) const;
QRect geometry(int index) const;
+ QRect clipRect(int index) const;
QWidget *widget(int index);
Flags flags(int index) const;
void lock(bool on);
bool isLocked() const;
- void appendTexture(QWidget *widget, GLuint textureId, const QRect &geometry, Flags flags = 0);
+ void appendTexture(QWidget *widget, GLuint textureId, const QRect &geometry,
+ const QRect &clipRect = QRect(), Flags flags = 0);
void clear();