<div dir="ltr"><div>In re this and related messages when creating a QtWebEngineView, I made the errors go away as follows.</div><div><br></div><div>In my root module, before I create the Application, I added the single line,</div><div>     import PyQt6.QtWebEngineWidgets</div><div><br></div><div>That module doesn't use WebEngine, in fact the WebEngineView is first instantiated much later when the user does something. But having this import before the Application starts prevents the error message later.</div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 13, 2022 at 10:55 AM David Cortesi <<a href="mailto:davecortesi@gmail.com">davecortesi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>When my code, long subsequent to creating the QApplication and a main window, hits this statement,</div><div><br></div><div>    from PyQt6.QtWebEngineWidgets import QWebEngineView</div><div><br></div><div>the following error message appears,</div><div><br></div><div>Qt WebEngine seems to be initialized from a plugin. Please set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute and QSGRendererInterface::OpenGLRhi using QQuickWindow::setGraphicsApi before constructing QGuiApplication.</div><div><br></div><div>I could do the first thing at the time I create the QApplication, but I never have cause to import QQuickWindow and don't want to.</div><div><br></div><div>Can anybody shed light on what this is about?</div><div><br></div></div>
</blockquote></div></div>