Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QWebEngineView v QWebView
Qt 6.11 is out! See what's new in the release blog

QWebEngineView v QWebView

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 967 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    coquetangler
    wrote on last edited by coquetangler
    #1

    With the recent removal of QWebView from Qt 5.6 and 5.7 I've been investigating the possibility of creating a proxy wrapper class called QWebView that makes calls into QWebEngineView.

    The async nature of the calls into QWebEngineView can be handled by looping reading events and dispatching them until the async callback is made.

    However, calling methods on objects in Qt from within the blink/V8 engine breaks too many applications. I understand the rationale behind using async calls rather than sync calls but nevertheless this makes it much more difficult to port applications that previously used WebKit...

    I have built V8 and have it integrated in our product already since Qt5. V8 has a reasonably decent API that provides the ability to extend it with C functions (property setters/getters and method calls). These are synchronous. It would seem therefore that if the V8 in blink used by QWebEngineView had one extension added into it which is the equivalent of:

    var result = execQObjectMethod("object_id", "name", args....);

    then sync calls could be made back into Qt code. The host QWebEngineView would simply need two new methods e.g. registerQObject("object_id", Object*) and execQObjectMethod("name", args...). This would then enable the wrapper proxy to be a drop in replacement for QtWebView.

    Thoughts anyone? or has anyone done this already?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved