Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.15
-
None
-
a1930f11540aee6b8f6c837b008888d0107f9183 (qt/qtwebengine/dev) 7b3368c5f41fa5f8e1cfdc93870a25cf30ba826e (qt/qtwebengine/6.2)
Description
Hi guys,
The document of when to call function QtWebengine::initialize() is self-contradictory.
Here the demo code shows that , QtWebengine::initialize() should call after QApplication is created.
https://doc.qt.io/qt-5/qtwebengine-overview.html
// code placeholder int main(int argc, char **argv) { QApplication app(argc, argv); QtWebEngine::initialize(); QMainWindow window; window.show(); return app.exec(); }
But here , the document says that , QtWebengine::initialize() should call before QGuiApplication is created.
https://doc.qt.io/qt-5/qtwebengine.html
"Sets up an OpenGL Context that can be shared between threads. This has to be done before QGuiApplication is created and before window's QPlatformOpenGLContext is created."