Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我按照此链接在 Windows 中使用 python 将 .ui 转换为 .py 但它不起作用。我尝试安装 pyuic4 但它不起作用。python中是否有任何工具或库可以做到这一点?请建议。
为什么不直接导入呢?
import sys from PyQt4 import QtGui, uic app = QtGui.QApplication(sys.argv) widget = uic.loadUi('demo.ui') widget.show() sys.exit(app.exec_())
ps:对不起,我无法在评论部分回答。我的名声太低了