zoukankan      html  css  js  c++  java
  • pyqt5_01_流程走通

    from PyQt5 import QtCore, QtGui, QtWidgets
    
    
    class Ui_Form(object):
        def setupUi(self, Form):
            Form.setObjectName("Form")
            Form.resize(682, 624)
    
            self.verticalLayout = QtWidgets.QVBoxLayout()   # 创建V1
            self.verticalLayout.setObjectName("verticalLayout")
    
            self.verticalLayout_2 = QtWidgets.QVBoxLayout(Form)  # 创建V2
            self.verticalLayout_2.setObjectName("verticalLayout_2")
    
    
    
            self.horizontalLayout = QtWidgets.QHBoxLayout()  # 创建H1
            self.horizontalLayout.setObjectName("horizontalLayout")
    
            self.horizontalLayout_2 = QtWidgets.QHBoxLayout()  # 创建H2
            self.horizontalLayout_2.setObjectName("horizontalLayout_2")
    
            self.horizontalLayout_3 = QtWidgets.QHBoxLayout()  # 创建H3
            self.horizontalLayout_3.setObjectName("horizontalLayout_3")
    
    
            self.radioButton = QtWidgets.QRadioButton(Form)  # 创建radio1
            self.radioButton.setObjectName("radioButton")
            self.radioButton_2 = QtWidgets.QRadioButton(Form)  # 创建radio2
            self.radioButton_2.setObjectName("radioButton_2")
            self.pushButton = QtWidgets.QPushButton(Form)  # 创建Button
            self.pushButton.setObjectName("pushButton")
    
            spaceItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
            spaceItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
            self.horizontalLayout_3.addItem(spaceItem1)
            self.horizontalLayout_3.addWidget(self.pushButton)
            self.horizontalLayout_3.addItem(spaceItem2)
    
            spaceItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
            spaceItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
            self.horizontalLayout.addItem(spaceItem3)
            self.horizontalLayout.addWidget(self.radioButton)
            self.horizontalLayout.addWidget(self.radioButton_2)
            self.horizontalLayout.addItem(spaceItem4)
    
            spaceItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
            spaceItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
            spaceItem7 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
            spaceItem8 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
            self.verticalLayout.addItem(spaceItem7)
    
    
            self.verticalLayout.addItem(spaceItem8)
            self.horizontalLayout_2.addLayout(self.verticalLayout)
            self.horizontalLayout_2.addItem(spaceItem6)
    
            self.verticalLayout_2.addLayout(self.horizontalLayout)
            self.verticalLayout_2.addLayout(self.horizontalLayout_2)
            self.verticalLayout_2.addLayout(self.horizontalLayout_3)
    
    
    
            self.retranslateUi(Form)
            QtCore.QMetaObject.connectSlotsByName(Form)
    
        def retranslateUi(self, Form):
            _translate = QtCore.QCoreApplication.translate
            Form.setWindowTitle(_translate("Form", "Form"))
            self.radioButton.setText(_translate("Form", "RadioButton"))
            self.radioButton_2.setText(_translate("Form", "RadioButton"))
            self.pushButton.setText(_translate("Form", "PushButton"))
    
    
    if __name__ == "__main__":
        import sys
        app = QtWidgets.QApplication(sys.argv)
        Form = QtWidgets.QWidget()
        ui = Ui_Form()
        ui.setupUi(Form)
        Form.show()
        sys.exit(app.exec_())
  • 相关阅读:
    《linux内核设计与实现》读书笔记第十八章
    20135337朱荟潼 Linux第八周学习总结——进程的切换和系统的一般执行过程
    2013337朱荟潼 Linux第四章读书笔记——进程调度
    2013337朱荟潼 Linux&深入理解计算机系统第七章读书笔记——链接
    20135337朱荟潼 Linux第七周学习总结——可执行程序的装载
    2013337朱荟潼 Linux第三章读书笔记——进程管理
    20135337朱荟潼 Linux第六周学习总结——进程的描述和进程的创建
    2013337朱荟潼 Linux第十八章读书笔记——调试
    20135337朱荟潼 Linux第五周学习总结——扒开系统调用的三层皮(下)
    2013337朱荟潼 Linux第五章读书笔记——系统调用
  • 原文地址:https://www.cnblogs.com/xiaochuichui/p/13281094.html
Copyright © 2011-2022 走看看