diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-04-13 09:46:15 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-04-13 09:46:15 +0200 |
commit | 4b72f48637a87c95deedcc501cd9cc8f717117fa (patch) | |
tree | 80f00ade2cc3f3845e0f309f39a2649040d203e3 /src/quickwidgets/qquickwidget.cpp | |
parent | 3d30c6d7b40ce86f49bc7bdc5c2c74ce180bb3dd (diff) | |
parent | f7e1f7b2f1f1577fd94dfffb93ef15ded5d09031 (diff) |
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
src/quick/util/qquickpixmapcache.cpp
tests/auto/quick/qquickwindow/BLACKLIST
Change-Id: Ie81612f2884f8ea508c48ba2735ec54ea1c2eca5
Diffstat (limited to 'src/quickwidgets/qquickwidget.cpp')
-rw-r--r-- | src/quickwidgets/qquickwidget.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index 269928e531..29577b856d 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -216,7 +216,7 @@ void QQuickWidgetPrivate::render(bool needsSync) QOpenGLFramebufferObject::blitFramebuffer(resolvedFbo, rect, fbo, rect); } - context->functions()->glFlush(); + static_cast<QOpenGLExtensions *>(context->functions())->flushShared(); } void QQuickWidgetPrivate::renderSceneGraph() @@ -1226,4 +1226,23 @@ void QQuickWidget::setClearColor(const QColor &color) d->offscreenWindow->setColor(color); } +/*! + \since 5.5 + + Returns the offscreen QQuickWindow which is used by this widget to drive + the Qt Quick rendering. This is useful if you want to use QQuickWindow + APIs that are not currently exposed by QQuickWidget, for instance + connecting to the QQuickWindow::beforeRendering() signal in order + to draw native OpenGL content below Qt Quick's own rendering. + + \warning Use the return value of this function with caution. In + particular, do not ever attempt to show the QQuickWindow, and be + very careful when using other QWindow-only APIs. +*/ +QQuickWindow *QQuickWidget::quickWindow() const +{ + Q_D(const QQuickWidget); + return d->offscreenWindow; +} + QT_END_NAMESPACE |