Make it possible to render QtWebEngine in QOpenGLWidget
Setup the GL context as shared with the Qt global share context. Change-Id: I199cfc7d290466d0ad99294bcffcd738b615862b Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
parent
9a4beb4d36
commit
495c4d501e
@ -79,6 +79,7 @@
|
||||
#include "qfileinfo.h"
|
||||
#include <QtGui/qinputmethod.h>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
#include <QtGui/private/qopenglcontext_p.h>
|
||||
|
||||
#include <private/qgraphicseffect_p.h>
|
||||
#include <qbackingstore.h>
|
||||
@ -11148,6 +11149,7 @@ QOpenGLContext *QWidgetPrivate::shareContext() const
|
||||
QWidgetPrivate *that = const_cast<QWidgetPrivate *>(this);
|
||||
if (!extra->topextra->shareContext) {
|
||||
QOpenGLContext *ctx = new QOpenGLContext();
|
||||
ctx->setShareContext(QOpenGLContextPrivate::globalShareContext());
|
||||
ctx->setFormat(extra->topextra->window->format());
|
||||
ctx->create();
|
||||
that->extra->topextra->shareContext = ctx;
|
||||
|
Loading…
Reference in New Issue
Block a user