Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-96002

The document QtWebengine is self-contradictory

    XMLWordPrintable

Details

    • 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."

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            yorkxychen york123 chen123
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes