I am attempting to package my Qt app as a flatpak.
It relies heavily on QtWebEngine, so I used this as a base app: GitHub - flathub/io.qt.qtwebengine.BaseApp
I am using qt6 with org.kde.Sdk and org.kde.Platform.
It packages successfully but then I get this error immediately when the app opens: module “QtWebEngine” plugin “qtwebenginequickplugin” not found.
The line in question is simply “import QtWebEngine” (QML).
The reason I am posting this here is because when the app is run on the host system (without flatpak) it works completely fine.
razzeee
September 27, 2023, 9:37am
2
Hey, while I haven’t experienced this problem, it’s usually easier, if you can share your manifest etc. if that’s possible for your application.
Here is the manifest:
app-id: ca.stevestudios.Swirl
runtime: org.kde.Platform
runtime-version: ‘6.5’
sdk: org.kde.Sdk
base: io.qt.qtwebengine.BaseApp
base-version: ‘6.5’
command: swirl
finish-args:
–share=ipc
–socket=x11
–socket=wayland
–filesystem=host
–device=dri
–env=QTWEBENGINEPROCESS_PATH=/app/bin/QtWebEngineProcess
cleanup-commands:
/app/cleanup-BaseApp.sh
modules:
name: swirl
buildsystem: simple
build-commands:
install -D ca.stevestudios.Swirl.appdata.xml /app/share/metainfo/ca.stevestudios.Swirl.appdata.xml
install -D ca.stevestudios.Swirl.desktop /app/share/applications/ca.stevestudios.Swirl.desktop
install -D ca.stevestudios.Swirl.svg /app/share/icons/hicolor/scalable/apps/ca.stevestudios.Swirl.svg
install -D ca.stevestudios.Swirl-symbolic.svg /app/share/icons/hicolor/symbolic/apps/ca.stevestudios.Swirl-symbolic.svg
sources:
type: file
path: ca.stevestudios.Swirl.desktop
type: file
path: ca.stevestudios.Swirl.svg
type: file
path: ca.stevestudios.Swirl-symbolic.svg
type: file
path: ca.stevestudios.Swirl.appdata.xml
name: swirl-bin
buildsystem: cmake-ninja
config-opts:
-DCMAKE_BUILD_TYPE=Release
sources:
type: archive
path: swirl-bin.tar.gz
…where swirl-bin is the Qt app source code.
qt.qpa.qgnomeplatform: Could not find color scheme “”
QQmlApplicationEngine failed to load component
It’s also worth mentioning that these errors (or maybe warnings) appear right before the main problem I have just described.
I am starting to think it is a bug with the base app (Not only am I sure I’ve tried everything in my power, but there is zero info on the web about this issue). I made an issue here: QtWebEngine import not found in QML · Issue #290 · flathub/io.qt.qtwebengine.BaseApp · GitHub
Also, it seems to only be a problem in QML, the C++ headers work fine.