Initial Commit
This commit is contained in:
31
2_2.py
Normal file
31
2_2.py
Normal file
@@ -0,0 +1,31 @@
|
||||
from PySide6.QtWidgets import QApplication, QWidget, QMainWindow, QPushButton, QLabel, QLineEdit, QHBoxLayout, \
|
||||
QVBoxLayout
|
||||
import sys
|
||||
|
||||
class MainWindow(QMainWindow):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
self.setWindowTitle('my App')
|
||||
self.setMinimumSize(400,300)
|
||||
|
||||
self.label=QLabel()
|
||||
|
||||
self.input=QLineEdit()
|
||||
self.input.textChanged.connect(self.label.setText)
|
||||
|
||||
layout=QVBoxLayout()
|
||||
layout.addWidget(self.input)
|
||||
layout.addWidget(self.label)
|
||||
|
||||
container=QWidget()
|
||||
container.setLayout(layout)
|
||||
|
||||
self.setCentralWidget(container)
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
|
||||
window = MainWindow()
|
||||
window.show()
|
||||
|
||||
app.exec()
|
||||
Reference in New Issue
Block a user