self.setLayout(main_layout)
window.show() sys.exit(app.exec()) 4.1 Signals and Slots Signals are emitted when an event occurs (e.g., button click). Slots are functions that respond to signals. pyqt6 tutorial
def mousePressEvent(self, event): print(f"Mouse click at (event.x(), event.y())") This example combines signals, slots, layouts, and widgets. event): print(f"Mouse click at (event.x()