diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-06-20 11:58:34 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-08-01 17:13:59 +0200 |
commit | e453484bca5add5973602044ff0fbc224f819a07 (patch) | |
tree | 67f8b2afcb6622fee78f45959980324eeaf4accf /src/corelib | |
parent | 718f248a8921ad310cbb9e099b16f5ffa0c860c1 (diff) |
Make QOpenGLWidget public
QOpenGLWidget is now public.
In addition Qt::WA_AlwaysStackOnTop is introduced to support the
special case of semi-transparent QOpenGLWidget or QQuickWidget on
top of regular widgets.
hellogl_es2 becomes the qopenglwidget example. This example performs
painting both via QPainter and native GL commands and has the OpenGL
widget combined with other, normal widgets.
The widget stack receives some changes when it comes to renderToTexture
widgets like QQuickWidget and QOpenGLWidget. Calling update() will now
result in a paint event, which is essential for QOpenGLWidget since we
want it to behave like a regular widget. The dirty region handling is
extended specially for such widgets due to performance reasons.
(an OpenGL content update must not result in any backingstore painting,
and is thus handled as a different kind of dirtiness)
[ChangeLog] Added QOpenGLWidget. This widget serves as a replacement for QGLWidget.
Task-number: QTBUG-36899
Task-number: QTBUG-40086
Change-Id: Ibf7f82fea99b39edfffd2fc088e7e0eadbca25cf
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qnamespace.h | 2 | ||||
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 3ec859dbb7..1b92a0e845 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -499,6 +499,8 @@ public: WA_X11DoNotAcceptFocus = 126, WA_MacNoShadow = 127, + WA_AlwaysStackOnTop = 128, + // Add new attributes before this line WA_AttributeCount }; diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index be569bcffe..f6ea3a3a81 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -1203,6 +1203,13 @@ to this top level window. This attribute has no effect on non-X11 platforms. + \value WA_AlwaysStackOnTop Since Qt 5.4, this value forces QOpenGLWidget and + QQuickWidget to be drawn last, on top of other widgets. Ignored for other + type of widgets. Setting this attribute breaks the stacking order, but + allows having a semi-transparent OpenGL widget with other widgets visible + underneath. It is strongly recommended to call update() on the widget's + top-level window after enabling or disabling this attribute. + \omitvalue WA_SetLayoutDirection \omitvalue WA_InputMethodTransparent \omitvalue WA_WState_CompressKeys |