proof of concept
This commit is contained in:
27
test_pyside.py
Normal file
27
test_pyside.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import sys
|
||||
from PySide6.QtWidgets import QApplication, QWidget, QLabel, QPushButton, QVBoxLayout
|
||||
|
||||
class TestWindow(QWidget):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.setWindowTitle("PySide6 Test")
|
||||
|
||||
# Tworzymy label
|
||||
self.label = QLabel("Hello from PySide6!", self)
|
||||
|
||||
# Tworzymy przycisk do zamykania
|
||||
self.close_button = QPushButton("Zamknij")
|
||||
self.close_button.clicked.connect(self.close)
|
||||
|
||||
# Układ pionowy
|
||||
layout = QVBoxLayout()
|
||||
layout.addWidget(self.label)
|
||||
layout.addWidget(self.close_button)
|
||||
|
||||
self.setLayout(layout)
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = QApplication(sys.argv)
|
||||
window = TestWindow()
|
||||
window.show()
|
||||
sys.exit(app.exec())
|
||||
Reference in New Issue
Block a user