ÓãCÂÛ̳

 ÕÒ»ØÃÜÂë
 Á¢¼´×¢²á
²é¿´: 1609|»Ø¸´: 1

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

[¸´ÖÆÁ´½Ó]
·¢±íÓÚ 2019-3-12 02:11:39 | ÏÔʾȫ²¿Â¥²ã |ÔĶÁģʽ

ÂíÉÏ×¢²á£¬½á½»¸ü¶àºÃÓÑ£¬ÏíÓøü¶à¹¦ÄÜ^_^

ÄúÐèÒª µÇ¼ ²Å¿ÉÒÔÏÂÔØ»ò²é¿´£¬Ã»ÓÐÕ˺ţ¿Á¢¼´×¢²á

x
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_())

ÏëÖªµÀС¼×Óã×î½üÔÚ×öɶ£¿Çë·ÃÎÊ -> ilovefishc.com
 Â¥Ö÷| ·¢±íÓÚ 2019-3-19 01:45:09 | ÏÔʾȫ²¿Â¥²ã
ûÓдó´ó¸ø»Ø´ðÒ»ÏÂÂð
ÏëÖªµÀС¼×Óã×î½üÔÚ×öɶ£¿Çë·ÃÎÊ -> ilovefishc.com
ÄúÐèÒªµÇ¼ºó²Å¿ÉÒÔ»ØÌû µÇ¼ | Á¢¼´×¢²á

±¾°æ»ý·Ö¹æÔò

СºÚÎÝ|ÊÖ»ú°æ|Archiver|ÓãC¹¤×÷ÊÒ ( ÔÁICP±¸18085999ºÅ-1 | ÔÁ¹«Íø°²±¸ 44051102000585ºÅ)

GMT+8, 2025-1-13 10:00

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

¿ìËٻظ´ ·µ»Ø¶¥²¿ ·µ»ØÁбí