\# ... (inside your application class)
button \= QPushButton("Click Me")
\# Connect the button's 'clicked' signal to the 'on\_button\_click' method (the slot).
button.clicked.connect(self.on\_button\_click)
def on\_button\_click(self):
print("Button was clicked\!")
QMessageBox.information(self, "Success", "Data has been processed.")