使用QTdesigner

生成.ui文件,输入命令行pyuic4 -o test.py test.ui

在生成的Python文件后面输入下面代码

if __name__=="__main__":
    import sys
    app=QtWidgets.QApplication(sys.argv)
    widget=QtWidgets.QWidget()
    ui=Ui_Form()
    ui.setupUi(widget)
    widget.show()
    sys.exit(app.exec_())

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
  • 2022-02-10
  • 2021-12-16
  • 2021-09-29
猜你喜欢
  • 2021-08-05
  • 2021-07-15
  • 2021-07-12
  • 2021-10-05
  • 2021-10-15
  • 2022-12-23
  • 2021-06-08
相关资源
相似解决方案