c++qtbrowserqtwebengine

How can I embed a custom QWidget in a QWebEngineView or page?


I know it is possible to do this with the deprecated class QtWebkit as shown here.

I would like to know if similar work can be done with the new QtWebEngine framework? I could not find a method to create plugin in a web page (QWebEnginePage). Is this related to the plugin technology in Chromium?

I'm currently just exploring the possibility of achieving this with Qt 5.5.


Solution

  • I can't find a completely clear answer one way or another, however at the end of the porting guide there's something that would suggest it's no longer possible:

    Qt WebEngine renders web pages using Skia and is not using QPainter or Qt for this purpose. The HTML5 standard also now offers much better alternatives that were not available when native controls plugins were introduced in Qt WebKit.

    No QPainter would mean that there's no way to draw a QWidget during render.