Signal¶
Synopsis¶
Functions¶
def |
def |
def |
Detailed Description¶
The
Signal
class provides a way to declare and connect Qt signals in a pythonic way.
- class PySide6.QtCore.Signal([type1 [, type2...]] [, name="" [, arguments=[]]])¶
- Parameters
name – str
arguments – list
Signal
takes a list of Python types of the arguments.
It is possible to use the same signal name with different types by passing a list of tuples representing the signatures, but this is a legacy technique recommended against in new code (see Overloading Signals and Slots with Different Types).
The optional named argument name
defines the signal name. If nothing is
passed, the new signal will have the same name as the variable that it is
being assigned to.
The optional named argument arguments
receives a list of strings
denoting the argument names. This is useful for QML applications which
may refer to the emitted values by name.
- 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 aSignal
.
- Signal.disconnect(receiver)¶
Disconnect this signal from a receiver, the receiver can be a Python callable, a
Slot
or aSignal
.
- Signal.emit(*args)¶
args is the arguments to pass to any connected slots, if any.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.