Details
Description
The documentation of QtWebEngine::initialize claims that one can also use Qt::AA_ShareOpenGLContexts:
from https://doc-snapshots.qt.io/qt5-5.6/qtwebengine.html#initialize :
Sets up an OpenGL Context that can be shared between processes. This has to be done after QGuiApplication is created, but before a Qt Quick window is created. This has the same effect as passing Qt::AA_ShareOpenGLContexts to the QGuiApplication constructor.
However, passing only Qt::AA_ShareOpenGLContexts to QGuiApplication argument leads to a crash on startup:
1 QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData>>::data qscopedpointer.h 135 0xfe3e61a 2 qGetPtrHelper<QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData>>> qglobal.h 1015 0xfe351eb 3 QOpenGLContext::d_func qopenglcontext.h 145 0xfe3e4c3 4 QOpenGLContext::format qopenglcontext.cpp 1094 0xfee6e51 5 QOpenGLContext::isOpenGLES qopenglcontext.cpp 1244 0xfee7835 6 QTypedArrayData<QByteArray>::unsharableEmpty Qt5WebEngineCored 0x10a2b6bd 7 WebEngineContext::WebEngineContext Qt5WebEngineCored 0x10a28daa 8 WebEngineContext::current Qt5WebEngineCored 0x10a29b7e 9 QtWebEngineCore::BrowserContextAdapter::defaultContext Qt5WebEngineCored 0x109afadd 10 QQuickWebEngineProfile::defaultProfile qquickwebengineprofile.cpp 576 0xf4fafac 11 QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate qquickwebengineview.cpp 101 0xf502c29 12 QQuickWebEngineView::QQuickWebEngineView qquickwebengineview.cpp 732 0xf500d41 13 QQmlPrivate::QQmlElement<QQuickWebEngineView>::QQmlElement<QQuickWebEngineView> qtwebengineplugind 0x3f890b2 14 QQmlPrivate::createInto<QQuickWebEngineView> qqmlprivate.h 102 0x3f834b5 15 QQmlType::create qqmlmetatype.cpp 740 0x653dffcd 16 QQmlObjectCreator::createInstance qqmlobjectcreator.cpp 1044 0x6545d432 17 QQmlObjectCreator::setPropertyBinding qqmlobjectcreator.cpp 741 0x6545eaaf 18 QQmlObjectCreator::setupBindings qqmlobjectcreator.cpp 695 0x6545e694 19 QQmlObjectCreator::populateInstance qqmlobjectcreator.cpp 1320 0x6545e176 20 QQmlObjectCreator::createInstance qqmlobjectcreator.cpp 1165 0x6545dd82 ... <More>