C++系列三:Qt-for-Python

发布时间 2023-09-12 21:27:32作者: cactus9

代码参考:
官方文档博客参考

代码参考:


 self.ui.pushButton.setText("demo")
 lable=QLabel("<font color=red size=40>Hello World!</font>")
 lable.show()

Signals and Slots:
from PySide6.QtCore import Slot
@Slot()
def say_hello():
    print("button")
def function():
    print("button")
button = QPushButton("Click me")
button.clicked.connect(say_hello)//function
button.show()