access element from .ui
问题 I have problem to access my button and label from my dialog.ui. I am using Python 3.x and QT Designer 5.x. from PyQt5 import uic, QtWidgets from PyQt5.QtWidgets import QApplication Form, Window = uic.loadUiType("dialog.ui") #load ui (GUI) file app = QApplication([]) #create a QApplication window = Window() form = Form() form.setupUi(window) def on_click(): # self.qlFreeText.text("hello") alert = QMessageBox() alert.setText("You clicked the button!") alert.exec_() class Ui(QtWidgets