Windows Version:Win10 Pro;
Pyside6 version:6.9.1
Python File:python-3.11.9-embed-amd64(downloaded from python website,and use pip to install Pyside6)
Python Script:import sys
from PySide6.QtWidgets import (
QApplication,
QMainWindow,
QPushButton,
QMessageBox
)
class MainWindow(QMainWindow):
def init(self):
super().init()
self.setWindowTitle("PySide6 ")
self.setGeometry(100, 100, 300, 200)
button = QPushButton("Hello", self)
button.setGeometry(100, 80, 100, 30)
button.clicked.connect(self.show_message)
def show_message(self):
QMessageBox.information(self, "OK", "OK,PySide6!")
if name == "main":
app = QApplication(sys.argv)
window = MainWindow()
window.show()
sys.exit(app.exec())