Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
5.15.0
-
None
-
-
7878a88aa638da63b8a2ec2200bbe18882277d21 (pyside/pyside-setup/dev), 205e6f1da (dev), a8a4f66c9 (6.6), 96b47106c (6.5)
Description
I would like it if `my_qobject.a_signal.connect()` returned something that could be passed to `my_qobject.a_signal.disconnect()`. Presently a `bool` is returned. `QObject::connect()` returns a `QMetaObject.Connection`.
https://doc.qt.io/qt-5/qobject.html#connect
https://doc.qt.io/qt-5/qmetaobject-connection.html
At the link there are a few comments about this for PyQt5 which did eventually add this.
https://riverbankcomputing.com/pipermail/pyqt/2017-December/039853.html
Perhaps this should be a suggestion but I feel it is reasonable to at least initially submit as a bug since this seems to not match the regular C++ connection methods. I presume this is applicable to 'all' versions and platforms but reported the ones I am presently running and have observed it on.
Attachments
Issue Links
- is duplicated by
-
PYSIDE-1902 signals connect method should return Connection object
- Closed
- relates to
-
PYSIDE-2509 Typing: connect() returns a QMetaObject.Connection object
- Closed
For Gerrit Dashboard: PYSIDE-1334 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
357786,8 | Return QMetaObject.Connection from QObject.connect() | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
357862,7 | shiboken6: Add support for operator bool | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
358036,4 | shiboken6: Document the bool cast functions | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
514362,4 | Fix signature of SignalInstance.connect() | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
514467,2 | Fix signature of SignalInstance.connect() | 6.6 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
514515,2 | Fix signature of SignalInstance.connect() | 6.5 | pyside/pyside-setup | Status: MERGED | +2 | 0 |