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

Duplicate class names causes QMetaObject misbehavior

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.12.2
    • PySide
    • None
    • Ubuntu 18.04
    • Linux/X11

    Description

      When a Python class has the same name as one of its base classes, its Signals are not properly installed on its QMetaObject.  Taking the example from the bottom of https://wiki.qt.io/Qt_for_Python_Signals_and_Slots, injecting a base class also named 'Communicate', and adding a second signal+slot causes warnings like this...

      Signals and slots in QMetaObject 'Communicate' are not ordered correctly, this may lead to issues.

      ...and the second slot cannot be triggered.  See the attached file for the full example.

      If the classes are given different names (e.g. 'Base' and 'Child'), then both slots are triggered and no warnings are emitted.

      This is a change in behavior since PySide 5.11.2.

      Attachments

        1. pyside983.zip
          2 kB
        2. signalbug.py
          0.6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            wemoloh Bart Robinson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes