JavaScript Confirm Box

mno

import sys from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QPushButton def on_button_click(): label.setText(“Button clicked!”) # Create the application instance app = QApplication(sys.argv) # Create the main window window = QMainWindow() window.setWindowTitle(“PyQt GUI Example”) window.setGeometry(100, 100, 300, 200) # Create a label widget label = QLabel(window) label.setText(“Hello, PyQt!”) label.setGeometry(50, 50, 200, 30) # Create a button widget button = QPushButton(window) button.setText(“Click Me!”) button.setGeometry(100, 100, 100, 30) button.clicked.connect(on_button_click) # Show the main window window.show() # Start the event loop sys.exit(app.exec_())