diff --git a/aula203-qtdesigner/src/main_window.py b/aula203-qtdesigner/src/main_window.py new file mode 100644 index 0000000..a9386df --- /dev/null +++ b/aula203-qtdesigner/src/main_window.py @@ -0,0 +1,23 @@ +import sys + +from PySide6.QtWidgets import QApplication, QMainWindow +from window import Ui_MainWindow + + +class MainWindow(QMainWindow, Ui_MainWindow): + def __init__(self, parent=None): + super().__init__(parent) + self.setupUi(self) + + self.buttonSend.clicked.connect(self.changeLabelResult) # type: ignore + + def changeLabelResult(self): + text = self.lineName.text() + self.labelResult.setText(text) + + +if __name__ == '__main__': + app = QApplication(sys.argv) + mainWindow = MainWindow() + mainWindow.show() + app.exec()