blob: a0660f88f1669e56113523838e4f41cd61e1df84 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
.. currentmodule:: PySide2.QtCore
.. _Signal:
Signal
******
Synopsis
--------
Functions
^^^^^^^^^
+---------------------------------------------------------------------------------------------+
|def :meth:`connect<Signal.connect>` (receiver) |
+---------------------------------------------------------------------------------------------+
|def :meth:`disconnect<Signal.disconnect>` (receiver) |
+---------------------------------------------------------------------------------------------+
|def :meth:`emit<Signal.disconnect>` (\*args) |
+---------------------------------------------------------------------------------------------+
Detailed Description
--------------------
The :class:`~.Signal` class provides a way to declare and connect Qt signals in a pythonic way.
PySide adopt PyQt's new signal and slot syntax as-is. The PySide implementation is functionally compatible with the PyQt 4.5 one, with the exceptions listed bellow.
.. method:: Signal.connect(receiver[, type=Qt.AutoConnection])
Create a connection between this signal and a `receiver`, the `receiver` can be a Python callable, a :class:`Slot` or a :class:`Signal`.
.. method:: Signal.disconnect(receiver)
Disconnect this signal from a `receiver`, the `receiver` can be a Python callable, a :class:`Slot` or a :class:`Signal`.
.. method:: Signal.emit(*args)
`args` is the arguments to pass to any connected slots, if any.
|