[Interest] PySide2 5.14.2 signal/slots changed

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


A more complete example. also narrow the bug, if the parent is set to self before launching the object the signal no more reach it, work under 5.14.0, 5.14.1 but not on 5.14.2. This is a show stopper for 5.14.2. I have open an issue:
https://bugreports.qt.io/browse/PYSIDE-1255


From: Interest <interest-bounces at qt-project.org> On Behalf Of Jérôme Godbout
Sent: April 1, 2020 11:21 AM
To: interest at qt-project.org
Subject: [Interest] PySide2 5.14.2 signal/slots changed

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/b13271a2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tar.xz
Type: application/octet-stream
Size: 2580 bytes
Desc: test.tar.xz
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200401/b13271a2/attachment.obj>


More information about the Interest mailing list