Hi,
I’m trying to display a web page using PySide2 and QtWidgets (QWebEngineView) or QML (WebEngineView), but all I get is a black rectangle where the web page should be.
For example, the code bellow shows the label at the top and a blank rectangle bellow it, like in this image:
# main.py
import sys
from pathlib import Path
from PySide2.QtGui import QGuiApplication
from PySide2.QtQml import QQmlApplicationEngine
from PySide2.QtWebEngine import QtWebEngine
MAIN_QML_FILE: str = (Path(__file__).parent / "main.qml").resolve().as_posix()
if __name__ == "__main__":
QtWebEngine.initialize()
app = QGuiApplication(sys.argv)
engine = QQmlApplicationEngine()
engine.quit.connect(app.quit)
engine.load(MAIN_QML_FILE)
app.exec_()
// main.qml
import QtQuick 2.13
import QtQuick.Layouts 1.13
import QtQuick.Window 2.13
import QtQuick.Controls 2.13
import QtWebEngine 1.10
Window {
visible: true
width: 600
height: 500
title: "HelloApp"
visibility: "FullScreen"
ColumnLayout {
anchors.fill: parent
Label {
text: "web test"
font.pointSize: 24
horizontalAlignment: Text.AlignHCenter
Layout.fillWidth: true
}
WebEngineView {
Layout.fillHeight: true
Layout.fillWidth: true
url: "https://www.google.com/"
}
}
}
I get no errors in the command line when starting the app and I can see the ~/.cache and ~/.local/share/ get some references to the url I’m trying to display (“google”, in the above example).
Installing lynx in the container allows to navigate just fine.
Any ideas what I am missing?
This is my tdx-info:
Software summary
------------------------------------------------------------
Bootloader: U-Boot
Kernel version: 6.6.84-7.2.0-devel-g87bfb710b6f1 #1-Torizon SMP PREEMPT Mon Mar 31 08:47:48 UTC 2025
Kernel command line: root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.0/torizon/4e38f45a0627c0d028da9c6cafd48eb2d1d39bcd762e95665811e4dd44059940/0 clk-imx8mp.mcore_booted=1 m7bootsync=1 nohlt
Distro name: NAME="Torizon OS"
Distro version: VERSION_ID=7.2.0-devel-20250804160339-build.0
Distro variant: VARIANT="Docker"
Hostname: verdin-imx8mp-15229926
------------------------------------------------------------
Hardware info
------------------------------------------------------------
HW model: Toradex Verdin iMX8M Plus WB on Yavia Board
Toradex version: 0058 V1.1B
Serial number: 15229926
Processor arch: aarch64
------------------------------------------------------------
The docker-compose.yml:
services:
webview-devel:
env_file:
- ./.env
build:
context: .
dockerfile: Dockerfile.devel
volumes:
- /tmp:/tmp
- /dev:/dev
- /var/run/dbus:/var/run/dbus
- /var/run/docker.sock:/var/run/docker.sock
device_cgroup_rules:
# ... for tty0
- "c 4:0 rmw"
# ... for tty7
- "c 4:7 rmw"
# ... for /dev/input devices
- "c 13:* rmw"
- "c 199:* rmw"
# ... for /dev/dri devices
- "c 226:* rmw"
# ... for abc4
- "c 509:0 rmw"
- "c 510:0 rmw"
- "c 511:0 rmw"
depends_on: [
weston
]
restart: always
user: torizon
weston:
image: torizon/weston${GPU}:4
env_file:
- ./.env
environment:
- ACCEPT_FSL_EULA=1
# Required to get udev events from host udevd via netlink
network_mode: host
volumes:
- /tmp:/tmp
- /dev:/dev
- /run/udev:/run/udev
cap_add:
- CAP_SYS_TTY_CONFIG
# Add device access rights through cgroup...
device_cgroup_rules:
# ... for tty
- "c 4:* rmw"
# ... for /dev/input devices
- "c 13:* rmw"
# ... for /dev/galcore
- "c 199:* rmw"
# ... for /dev/dri devices
- "c 226:* rmw"
# ... for /dev/dma_heap device
- "c 253:* rmw"
restart: always
The .env:
##
# Board architecture
##
IMAGE_ARCH=arm64
##
# Board GPU vendor prefix
##
GPU=-imx8
Thank you.

