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

signalInstanceEmit should use QtCore.QObject.emit(self, ...)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • 1.1.2
    • PySide
    • None

    Description

      signalInstanceEmit should use QtCore.QObject.emit(self, "signal()", data) instead of MyClass.emit(self, "signal()", data), assuming MyClass inherits from QObject.

      I bumped into this issue while creating a subclass from logging.Handler that I wanted to emit signals from, so I inherited from QObject too. But the problem is that logging.Handler needs you to implement emit(self, logRecord), so self.my_signal.emit(data) tries to use that implementation instead of QObject's one.

      Here's a sample code for this error: https://gist.github.com/chiiph/5673107

      Attachments

        1. pyside-167.py
          0.8 kB
          Christian Tismer
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            chiiph Tomas Touceda
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes