【发布时间】:2021-01-23 05:08:53
【问题描述】:
我使用 Qt 设计器为 Python 应用程序制作了一个 UI。我使用pyuic5 从.ui 文件创建了python 代码文件。但是,当我尝试运行我的应用程序时,出现此错误:`
qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in ""
This application failed to start because no Qt platform plugin could be initialized.
Reinstalling the application may fix this problem.
我是 Qt 新手,我使用 Brew 安装了它,并且我正在使用带有 Python 3.9.1 的 Conda 环境。
编辑:我只是尝试从 github 下载 qt 生成的 py 文件,当我自己没有创建 .py 文件时,它可以工作。不过,我应该怎么做才能从我的 .ui 文件中生成 .py 文件。
【问题讨论】: