Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1334

Return QMetaObject.Connection from SignalInstance.connect()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.15.0
    • PySide
    • None
    • Linux/X11
    • 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

        1. pyside1334_diag.diff
          3 kB
          Friedemann Kleint
        2. pyside1334.py
          1 kB
          Friedemann Kleint

        Issue Links

          For Gerrit Dashboard: PYSIDE-1334
          # Subject Branch Project Status CR V

          Activity

            People

              kleint Friedemann Kleint
              altendky Kyle Altendorf
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes