This base application provides Qt's WebEngine module, which is missing from the KDE runtime, and makes it possible to quickly and easily package applications that depend on this module.
If you just found this base application, then you might also be interested in the PyQt base application.
To help improving this documentation, open a pull request against the wiki branch.
Any branch based on a non-EOL base runtime should be supported. Branches are considered end-of-life when the base branch is EOL. The current list of supported branches is:
Baseapp branch | Base branch | Qt Webengine version |
---|---|---|
branch/5.15-23.08 |
5.15-23.08 | 5.15.x-lts |
branch/6.6 |
6.6 | 6.6.x |
branch/6.7 |
6.7 | 6.7.x |
- QtWebEngine
- QtWebView
- krb5: Just the minimal needed for Kerberos authentication with Chromium
- libevent
- minizip
- pciutils: libpci without utilities
- re2
- snappy
QtWebEngine dictionaries are built from the Hunspell dictionaries and included in this base application.
When building a Flatpak application with this base application, these dictionaries will be packaged in the generated locale extensions,
will not be bundled with the application itself, and that's as long as the maintainer didn't disable locale extensions by setting the
separate-locales
property.
Applications are expected to set the environment variable QTWEBENGINE_DICTIONARIES_PATH
to /app/qtwebengine_dictionaries
.
Support for spawning sandboxed Flatpak instances is included, and will be used by QtWebEngine to sandbox Chromium's render processes.
During build process, if an application needs a running QtWebengine process sandboxing must be disabled:
build-options:
env:
QTWEBENGINE_DISABLE_SANDBOX: '1'
# Or alternatively
QTWEBENGINE_CHROMIUM_FLAGS: --no-sandbox
Flatpak sandboxing support for Chromium was developed by Ryan Gonzalez for the Chromium Flatpak application.
QML modules for Qt Pdf, Webengine and Webview are located in /app/qml
. If you rely on those you should add QML_IMPORT_PATH=/app/qml
as an environment variable in your application manifest.
Qt webengine installs some pkgconfig files in /app/lib/$(gcc --print-multiarch)/pkgconfig
which is not in the PKG_CONFIG_PATH
set by flatpak-builder
. If your program relies on them at build time you need to use append-pkg-config-path
or prepend-pkg-config-path
in the manifest.
build-options:
arch:
aarch64:
prepend-pkg-config-path: /app/lib/aarch64-linux-gnu/pkgconfig
x86_64:
prepend-pkg-config-path: /app/lib/x86_64-linux-gnu/pkgconfig
Please make sure to cleanup development files from the BaseApp, in the application
cleanup-commands:
- /app/cleanup-BaseApp.sh
id: org.kde.QtWebEngine.SampleApplication
runtime: org.kde.Platform
runtime-version: '6.6'
sdk: org.kde.Sdk
base: io.qt.qtwebengine.BaseApp
base-version: '6.6'
command: qtwebengine-sample-application
finish-args:
- --device=dri
- --env=QTWEBENGINEPROCESS_PATH=/app/bin/QtWebEngineProcess
- --share=ipc
- --share=network
- --socket=fallback-x11
- --socket=pulse
- --socket=wayland
cleanup-commands:
- /app/cleanup-BaseApp.sh
modules:
- name: sample-application
...