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

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.14.1
    • Fix Version/s: 5.14.1
    • Component/s: PySide
    • Labels:
      None
    • Environment:
      WIN10 X64, PYTHON 3.6.8 32BIT, PYSIDE2 5.14.0
    • Platform/s:
      Windows
    • Commits:
      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.qml
          0.6 kB
        2. main.py
          0.7 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            crmaurei Cristian Maureira-Fredes
            Reporter:
            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