[Interest] PySide2 5.14.2 signal/slots changed

Jérôme Godbout godboutj at amotus.ca
Wed Apr 1 17:21:20 CEST 2020


Hi,
I was trying the signal/slots for a Python application, but with the new version I discovered that the signal is no more reaching my Qml anymore, reverting to 5.14.0 PySide2 fix the problem.

Python code:

from PySide2.QtCore import QObject, Signal

class BObj(QObject):
                ...

class AObj(QObject):
dataReceived = Signal(BObj)

                def myFct(self):
                                toto = BObj(self)
                                print("before", flush=True) # print before and after on both version of PySide2 5.14.0 and 5.14.2
                                self.dataReceived.emit(toto)
                                print("after", flush=True)

Qml Code:

AObj
{
                onDataReceived:
                {
                  console.log("Reach Qml"); // This print with PySide 5.14.0 but not in 5.14.2
                var b_obj = arguments[0]; // no named arguments from python, weird syntax lead to this
                }
}

Is there any changes or this was not allowed??? or this is a bug into 5.14.2? (I could reproduce on Linxu and Windows. Is the signals syntax changes or something?

Jerome
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200401/3757f373/attachment.html>


More information about the Interest mailing list