Advertisement
Guest User

widget

a guest
Jul 28th, 2021
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.15 KB | None | 0 0
  1. from PyQt6 import QtCore, QtGui, QtWidgets
  2.  
  3.  
  4. class Ui_Form(object):
  5.     def setupUi(self, Form):
  6.         Form.setObjectName("Form")
  7.         Form.resize(400, 41)
  8.         self.horizontalLayout = QtWidgets.QHBoxLayout(Form)
  9.         self.horizontalLayout.setObjectName("horizontalLayout")
  10.         self.label = QtWidgets.QLabel(Form)
  11.         self.label.setObjectName("label")
  12.         self.horizontalLayout.addWidget(self.label)
  13.         self.pushButton = QtWidgets.QPushButton(Form)
  14.         self.pushButton.setObjectName("pushButton")
  15.         self.horizontalLayout.addWidget(self.pushButton)
  16.  
  17.         self.retranslateUi(Form)
  18.         QtCore.QMetaObject.connectSlotsByName(Form)
  19.  
  20.     def retranslateUi(self, Form):
  21.         _translate = QtCore.QCoreApplication.translate
  22.         Form.setWindowTitle(_translate("Form", "Form"))
  23.         self.label.setText(_translate("Form", "TextLabel"))
  24.         self.pushButton.setText(_translate("Form", "PushButton"))
  25.  
  26.  
  27. if __name__ == "__main__":
  28.     import sys
  29.     app = QtWidgets.QApplication(sys.argv)
  30.     Form = QtWidgets.QWidget()
  31.     ui = Ui_Form()
  32.     ui.setupUi(Form)
  33.     Form.show()
  34.     sys.exit(app.exec())
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement