qt.qpa.xcb: could not connect to display :0.0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
时间: 2023-08-17 14:13:15 浏览: 240
这个错误是由于远程连接服务器时无法直接传回图形界面导致的。这个错误通常在使用Qt库时出现,比如在代码中使用了cv.imshow()函数。解决这个问题的方法是注释掉相关的代码,不要使用cv.imshow()函数。另外,你可以尝试在终端中输入sudo vim /etc/profile命令来编辑配置文件,然后添加一行代码来解决这个问题。
#### 引用[.reference_title]
- *1* [qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin “xcb](https://blog.csdn.net/qq_43248104/article/details/131381976)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [解决qt.qpa.xcb: could not connect to display问题](https://blog.csdn.net/every_step/article/details/120640384)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [远程服务器时Ubuntu报错:qt.qpa.xcb: could not connect to display](https://blog.csdn.net/liuyang_xyz/article/details/126520299)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文