Static builds are not supported.
The requirements for building Qt modules from source are listed separately for each supported platform:
In addition, the following tools are required for building the Qt WebEngine module:
On all platforms, the following tools are required at build time:
On Windows, the following additional tools are required:
Qt WebEngine can only be built on 64-bit Windows, with a x64-bit toolchain. For building Qt WebEngine for x86 applications, you need to configure and compile Qt with the Visual Studio x64 to x86 cross-compile toolchain. This
toolchain can be set up on the command line by running vcvarsall.bat amd64_x86
.
Note: It is not recommended to use tools form msys2
or cygwin
to build Qt WebEngine as it may result in build errors.
On Linux, Clang or GCC version 9 or later is required.
Qt WebEngine requires pkg-config
to detect most of its dependencies. The following pkg-config
files are required:
dbus-1
fontconfig
If Qt was configured for xcb
, the following pkg-config
files are also required:
libdrm
xcomposite
xcursor
xi
xrandr
xscrnsaver
xtst
On macOS, the following are required:
Note: Qt WebEngine cannot be built for the 32-bit mode of macOS (using the macx-clang-32
mkspec
).
Building Qt WebEngine with earlier Qt versions (down to the last LTS version) is supported. It means that Qt WebEngine 6.4 can be built with Qt 6.2.x, Qt 6.3.x, and Qt 6.4.
To use an earlier Qt version to build Qt Webengine:
qmake && make (&& make install)
.Applications using Qt WebEngine are not compatible with the Mac App Store, because:
To make Qt WebEngine work correctly when streaming to an AppleTV from a MacBook that supports GPU switching, it is important to add the NSSupportsAutomaticGraphicsSwitching
option to the application Info.plist
file, with the value set to YES
. Otherwise rendering issues might occur when creating new web engine view instances after Airplay is switched on or off.
If a new default QSurfaceFormat with a modified OpenGL profile has to be set, it should be set before the application instance is declared, to make sure that all created OpenGL contexts use the same OpenGL profile.
On macOS, if the default QSurfaceFormat is set after the application instance, the application will exit with qFatal(), and print a message that the default QSurfaceFormat should be set before the application instance.
Qt WebEngine provides out-of-the-box sandboxing support for Chromium render processes.
On Linux, note the following restrictions:
/proc/sys/kernel/unprivileged_userns_clone
to 1.seccomp-bpf
feature (kernel version 3.5 or later).To explicitly disable sandboxing, use one of the following options:
QTWEBENGINE_DISABLE_SANDBOX
environment variable to 1.--no-sandbox
command line argument to the user application executable.QTWEBENGINE_CHROMIUM_FLAGS
to --no-sandbox
.For more information, see Using Command-Line Arguments.
When running Qt Web Engine examples in a Docker container and browsing content-heavy sites, BUS errors (SIGBUS) might be reported. Typically, this is caused by Docker running a container with a too small memory space (such as 64MB). To fix this problem, increase the memory space size.
Qt WebEngine enables accessibility support for web pages when the following conditions are met:
Due to some limitations, the Linux QPA plugin almost always reports that accessibility should be activated. On big HTML pages, this can cause a significant slowdown in rendering speed.
Because of that, Qt WebEngine accessibility support is disabled by default on Linux. It can be re-enabled by setting the QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY
environment variable to a non-empty value.
Because of a limitation in the Windows compositor, applications that show a fullscreen web engine view will not properly display popups or other top-level windows. The reason and workaround is described in Fullscreen OpenGL Based Windows.