Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Unable to run Qt WebView sample code
Forum Updated to NodeBB v4.3 + New Features

Unable to run Qt WebView sample code

Scheduled Pinned Locked Moved Unsolved Qt WebKit
2 Posts 2 Posters 1.1k 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.
  • J Offline
    J Offline
    jean_b
    wrote on 22 Oct 2019, 10:02 last edited by
    #1

    Hello,

    I have built and installed QtWebKit and QtWebView from source https://code.qt.io/cgit/ at tag 5.12.5.
    I have built the sample project minibrowser.pro.
    When I run the project, it says :

    No WebView plug-in found!

    I'm running Ubuntu 19.04 and using Qt5.12.5.
    The WebView libraries are installed in <QT_INSTALL_DIR>/lib
    Plugins loaded: libqwbmp, libqwebp.
    Another message says:

    On QtCore unload, "/usr/local/Qt-5.12.5/qml/QtWebView/libdeclarative_webview.so" was leaked, with 2 users

    Any help would be precious ;)

    1 Reply Last reply
    1
    • D Offline
      D Offline
      danryu
      wrote on 21 Jun 2022, 16:16 last edited by danryu
      #2

      Getting the same error ("No WebView plug-in found!) when trying to run the minibrowser sample with

      Qt 6.3.1
      macOS 11.6.7
      XCode 13.2.1

      It really would be useful to have a minimal Qt WebView example actually working!

      UPDATE: I found a workaround on macOS - set the following environment variable in the Run environment:
      QT_WEBVIEW_PLUGIN=native

      However this hasn't worked on Linux, where the setting (I think) would be:
      QT_WEBVIEW_PLUGIN=webengine

      None of this is mentioned anywhere in Qt6 docs for WebView as far as I know. I had to read the source at
      https://code.qt.io/cgit/qt/qtwebview.git/tree/src/webview/qwebviewfactory.cpp?h=6.3.1
      to find that out. And the source code itself is not clear - the comments there suggest that the native web runtime is not used on macOS.
      Which is the opposite of what the docs suggest: https://doc.qt.io/qt-6/qtwebview-index.html - "On macOS, the system web view is used in the same manner as iOS."

      Does anybody at Qt care to comment on this? The lack of working examples and clear documentation on this make it seem like the whole WebView is deprecated or unmaintained.

      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