Arch linux: QT apps crash on launch: qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""

When I try to launch some QT apps I get this message:

qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
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, xcb, minimal, offscreen, vnc.

fish: Job 1, './app' terminated by signal SIGABRT (Abort)

How can I resolve this problem so QT apps can run normally ?
Thank you for help


Info:

  • I use wayland + sway
  • I have qt5-wayland and qt6-wayland already installed
Asked By: Jan Černý

||

Solution

Solution to this problem was to remove this line:

QT_QPA_PLATFORM=wayland

from /etc/environment.

Explanation

Thsi venv forced QT apps to run natively on wayland but some apps come with bundled QT libs and without wayland support.

Answered By: Jan Černý
Categories: Answers Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.