opened 01:58PM - 05 Sep 23 UTC
closed 12:40PM - 11 Sep 23 UTC
**Please only ask one question per issue!**
**Describe what it is that you wa…nt to accomplish**
The error message contains the string:
`This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.`
Which application should be re-installed?
**Describe alternatives you've considered**
Running the following script from [The Picamera2 Library](https://datasheets.raspberrypi.com/camera/picamera2-manual.pdf) page 7 documentation:
```
from picamera2 import Picamera2, Preview
import time
picam2 = Picamera2()
camera_config = picam2.create_preview_configuration()
picam2.configure(camera_config)
picam2.start_preview(Preview.QTGL)
picam2.start()
time.sleep(2)
picam2.capture_file("test.jpg")
```
**Preview.DRM** had more errors.
**Additional context**
Add any other context or screenshots about the request here.
```
$ sudo apt install python3-v4l2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-v4l2 is already the newest version (0.3.2-1).
python3-v4l2 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
```
There is no pip3 installed v4l2 package as shown below:
```
user@raspberrypi:~/.local/lib/python3.9/site-packages $ ls
ljpegCompress.cpython-39-arm-linux-gnueabihf.so piexif
numpy piexif-1.1.3.dist-info
numpy-1.23.1.dist-info __pycache__
OpenGL PyOpenGL-3.1.6.dist-info
pidng simplejpeg
pidng-4.0.9.dist-info simplejpeg-1.6.4.dist-info
$ uname -a
Linux raspberrypi 6.1.21+ #1642 Mon Apr 3 17:19:14 BST 2023 armv6l GNU/Linux
$
OS: Raspbian GNU/Linux 11 (bullseye) armv6l
Host: Raspberry Pi Model B Plus Rev 1.2
```
_Glamor_ is enabled; required to run _libcamera-hello_ successfully.
With **Preview.QTGL** the following output is displayed:
```
$ python3 ./camera_test.py
[11:36:33.147519858] [31060] INFO Camera camera_manager.cpp:297 libcamera v0.0.5+83-bde9b04f
[11:36:33.370927893] [31061] INFO RPI vc4.cpp:437 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media3 and ISP device /dev/media0
[11:36:33.373569846] [31061] INFO RPI pipeline_base.cpp:1101 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
[11:36:33.472279094] [31060] INFO Camera camera.cpp:1033 configuring streams: (0) 640x480-XBGR8888 (1) 640x480-SGBRG10_CSI2P
[11:36:33.476899012] [31061] INFO RPI vc4.cpp:565 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format: 640x480-SGBRG10_1X10 - Selected unicam format: 640x480-pGAA
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
Aborted
```
Thanks!