¤¢¤ê¤¬¤È¤¦ ·¢±íÓÚ 2019-3-12 02:11:39

ÃÈÐÂÎÊÒ»ÏÂΪʲôÔÚPYQTŪµÄ´°¿ÚÉú³ÉpyºóÎÞ·¨ÔÚPyÏÔʾÄØ

from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_Dialog(object):
    def setupUi(self, Dialog):
      Dialog.setObjectName("Dialog")
      Dialog.resize(400, 300)
      self.label = QtWidgets.QLabel(Dialog)
      self.label.setGeometry(QtCore.QRect(150, 120, 81, 21))
      self.label.setObjectName("label")

      self.retranslateUi(Dialog)
      QtCore.QMetaObject.connectSlotsByName(Dialog)

    def retranslateUi(self, Dialog):
      _translate = QtCore.QCoreApplication.translate
      Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
      self.label.setText(_translate("Dialog", "µÚÒ»¸ö´°¿Ú"))

ÎÒ¿´ÁËÍøÉÏÔڵײ¿Ìí¼Ó¶Î´úÂë¾Í¿ÉÒÔÏÔʾµ«Ìí¼ÓºóÒ²±¨´íÁË
if __name__ == "__main__":
        import sys
        app = QtWidgets.QApplication(sys.argv)
        widget = QtWidgets.QWidget()
        ui = Ui_MainWindow()
        ui.setupUi(widget)
        widget.show()
        sys.exit(app.exec_())

¤¢¤ê¤¬¤È¤¦ ·¢±íÓÚ 2019-3-19 01:45:09

ûÓдó´ó¸ø»Ø´ðÒ»ÏÂÂð
Ò³: [1]
²é¿´ÍêÕû°æ±¾: ÃÈÐÂÎÊÒ»ÏÂΪʲôÔÚPYQTŪµÄ´°¿ÚÉú³ÉpyºóÎÞ·¨ÔÚPyÏÔʾÄØ