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

Adding QtCore.Slot() decorator to base class function influences which thread executes slot in a derived class.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • 6.0
    • 1.2.2
    • PySide
    • Debian Linux, python 3.4.1, PySide 1.2.2. But reproducible in Windows.

    Description

      Adding QtCore.Slot() decorator to base class function influences which thread executes slot in a derived class.

      See attached example.

      Executing it as-is will show that the DerivedClass's triggered() function is executed in the MainThread (see logging output).

      Commenting out the @QtCore.Slot() decorator in line 13 and executing again will show that the slot is now executed in the Dummy-1 thread, as expected.

      Also tried this with PyQt4, this shows the expected bahavior: there, the triggered() method is always executed in the Dummy-1 thread.

      Attachments

        1. SlotExecutionFromWrongThread.py
          2 kB
          Sidney Cadot
        2. pyside-249-SlotExecutionFromWrongThread.py
          2 kB
          Christian Tismer
        3. bug_reproduce.py
          1 kB
          Tom Horrocks

        Issue Links

          Activity

            People

              Unassigned Unassigned
              reddish Sidney Cadot
              Votes:
              7 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated: