ÃÈÐÂÎÊÒ»ÏÂΪʲôÔÚPYQTŪµÄ´°¿ÚÉú³ÉpyºóÎÞ·¨ÔÚPyÏÔʾÄØ
from PyQt5 import QtCore, QtGui, QtWidgetsclass 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_())
ûÓдó´ó¸ø»Ø´ðÒ»ÏÂÂð
Ò³:
[1]