Could not load the Qt platform plugin "xcb" in "../cv2/qt/plugins" even though it was found

I got this error when I was debugging my application:

qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “/home/user/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/python/lib/python3.7/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.

There are no error when I run the application normally. I am not using Jetson.
Please find attached the error log. Let me know the solution; I do not want to re-install the application as mentioned in the error log.

Qt platform plugin .log (20.7 KB)

Hi @kartik.sachdev1 - Can you follow these steps and confirm if the issue resolves or not?

  1. Check if the “libxcb” library installed on your system, if not then you can install it.

  2. Set the QT_QPA_PLATFORM_PLUGIN_PATH environment variable to point to the correct location of the Qt platform plugins.

  3. If the issue still persists, then you can reinstall the Qt libraries and plugins.