python PyQt5 Signal类 (Signal类提供了一种以pythonic方式声明和连接Qt信号的方法)(connect()、disconnect()、emit())

https://doc.qt.io/qtforpython/PySide2/QtCore/Signal.html?highlight=connect#PySide2.QtCore.Signal.connect

文章目录

细节描述

Signal类提供了一种以pythonic方式声明和连接Qt信号的方法。

PySide照原样采用PyQt的新信号和插槽语法。 PySide实现与PyQt 4.5版本在功能上兼容,但以下列出的除外。

Signal.connect(receiver[, type=Qt.AutoConnection])¶
Create a connection between this signal and a receiver, the receiver can be a Python callable, a Slot or a Signal.
在此信号与接收器之间建立连接,接收器可以是Python可调用的,插槽或信号。
Signal.disconnect(receiver)¶
Disconnect this signal from a receiver, the receiver can be a Python callable, a Slot or a Signal.
断开此信号与接收器的连接,接收器可以是Python可调用的,插槽或信号。
Signal.emit(*args)¶
args is the arguments to pass to any connected slots, if any.
args是传递到任何连接的插槽(如果有)的参数。
发布了1058 篇原创文章 · 获赞 86 · 访问量 33万+

猜你喜欢

转载自blog.csdn.net/Dontla/article/details/105627716