Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PySide6.QtWidgets import QApplication, QWidget, QLabel, QVBoxLayout, QPushButton
- import sys
- class MyWindow(QWidget):
- def __init__(self):
- super(MyWindow, self).__init__()
- self.setWindowTitle("Pyside 6 test")
- self.resize(300, 100)
- main_layout = QVBoxLayout(self)
- label = QLabel("Hello World")
- main_layout.addWidget(label)
- button = QPushButton("Close")
- button.clicked.connect(self.close)
- main_layout.addWidget(button)
- if __name__ == '__main__':
- app = QApplication(sys.argv)
- win = MyWindow()
- win.show()
- app.exec()
Add Comment
Please, Sign In to add comment