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

named argument "name" in QtCore.Signal() is not working

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.14.1
    • 5.14.1
    • PySide
    • None
    • WIN10 X64, PYTHON 3.6.8 32BIT, PYSIDE2 5.14.0
    • Windows
    • af3a453d35dfe215478d953bee94997c3e3c65de (pyside/pyside-setup/5.14)

    Description

      Per https://wiki.qt.io/Qt_for_Python_Signals_and_Slots:

      Using QtCore.Signal()

      Signals can be defined using the QtCore.Signal() class. Python types and C types can be passed as parameters to it. If you need to overload it just pass the types as tuples or lists.

      In addition to that, it can receive also a named argument name that defines the signal name. If nothing is passed as name then the new signal will have the same name as the variable that it is being assigned to.

      The Examples section below has a collection of examples on the use of QtCore.Signal().

      Note: Signals should be defined only within classes inheriting from QObject. This way the signal information is added to the class QMetaObject structure.

      Argument "name" in QtCore.Signal() will change the signal name.
      But the signal name remains the same as the variable name.

      Attachments

        1. main.py
          0.7 kB
        2. main.qml
          0.6 kB
        For Gerrit Dashboard: PYSIDE-1192
        # Subject Branch Project Status CR V

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            wzzgdcn Weizhen Zheng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes