解决方案

解决方案

当我尝试启动一些 QT 应用程序时,我收到以下消息:

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)

如何解决这个问题,让QT应用程序可以正常运行?
谢谢你的帮助


信息:

  • 我用wayland + sway
  • qt5-wayland已经qt6-wayland安装了

答案1

解决方案

这个问题的解决方案是删除这一行:

QT_QPA_PLATFORM=wayland

/etc/environment

解释

Thsi venv 强制 QT 应用程序在 Wayland 上本机运行,但某些应用程序附带捆绑的 QT 库并且没有 Wayland 支持。

相关内容