python PyQt5 Signal类 (Signal类提供了一种以pythonic方式声明和连接Qt信号的方法)(connect()、disconnect()、emit())
生活随笔
收集整理的这篇文章主要介绍了
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是传递到任何连接的插槽(如果有)的参数。总结
以上是生活随笔为你收集整理的python PyQt5 Signal类 (Signal类提供了一种以pythonic方式声明和连接Qt信号的方法)(connect()、disconnect()、emit())的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: python PyQt5 QtWidge
- 下一篇: python PyQt5 sender(