QT Platform plugin issue on raspberry pi
-
I'm trying to run a code in Visual Studio Code for ArUco marker detection and i'm using an ArduCam camera module 3. But once I run the code I am receiving this message through the terminal:
Selected sensor format: 1536x864-SBGGR10_1X10 - Selected unicam format: 1536x864-pBAA
QObject::moveToThread: Current thread (0x7f8002f960) is not the object's thread (0x7f8017f550).
Cannot move to target thread (0x7f8002f960)qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/cbarreto/env/lib/python3.11/site-packages/cv2/qt/plugins" 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: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx.
Aborted
I wish I could submit a photo to not make this post gigantic but I've tried installing libxcb-xinerama0. I updated picamera2 and opencv. I checked for missing dependencies using ldd /path/to/qt/plugins/platforms/libqxcb.so but it didn't seem to do anything and i also tried to create a symbolic link with sudo ln -sf /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/ /usr/bin/ but nothing seemed to happen in the terminal. I'm very new to raspberry pi so I don't know what I'm doing or if I'm doing it properly.
-
Please set QT_DEBUG_PLUGINS env variable before starting your app and then check the output: it should say exactly what is wrong. See https://doc.qt.io/qt-6/debug.html