"No WebView plug-in found!" with Qt 6.2.3 on Linux
-
I've build Qt 6.2.3 from source, passing
-skip qtwebengine
to./configure
to work around some showstoppers.I have then been able to
qmake
andmake
a simple QML based project and run it on Linux with the-platform eglfs
flag. When I was targeting Raspberry Pi OS, I'm sure the webview appeared. Now I'm targeting a Yocto based distribution, the dreaded "No WebView plug-in found!" error is back, and no webview appears.I've tried every variation of
QT +=
I can think of, lots of permutations ofQtWebView::initialize();
and reviewed the Qtconfigure
andmake
over and over looking for clues. I see/qt/plugins
does not containwebview
, however all the usuallibqtwebviewquickplugin.so
andlibQt6WebView.so.6
/libQt6WebViewQuick.so
do appear in the right spots.I've attached the output when I run my app with
QT_DEBUG_PLUGINS=1
set. Argh, not enough permissions. Hang on... here it is as a gist.What it required to get WebView to work on Linux in Qt 6.2, with WebEngine disabled?
-
Hi,
You can't have it without on Linux as stated in the module documentation.
-
Hmm, I see. The
configure
script disagrees:Checking dependencies of 'qtwebview' Skipping optional dependency 'qtwebengine' of 'qtwebview', because building 'qtwebengine' was explicitly disabled.
I thought for sure I had this working on RPiOS, and all the way from Qt configure to project build to app run, I'm led to believe I could. But that sounds pretty definitive, so perhaps it was just wishful thinking...
An excerpt from my notes:
There was some doubt about whether
qtwebview
had dependencies onqtwebengine
, but I've proven by way of a running GUI on the Raspberry Pi 3B+ plus 7" Touchscreen, in X, VNC and bare console forms, thatqtwebengine
is not required.It's been a long, long night, so maybe I got my wires crossed.
-
Something may have changed and the doc is wrong. From what I remember, QtWebView makes use of the OS provided web API and on Linux (and Windows for that matter) there's not an OS based API that provides that.
I would be happy to be proven wrong though.
-
Just to close the loop, I was unable to prove you wrong, @SGaist . I bit the bullet and recompiled with
qtwebengine
enabled (no small feat!) and everything started working the way I remembered it. So I think I may have led myself astray with optimistic recall.