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-boun...@qt-project.org> On Behalf Of Jérôme Godbout
Sent: April 1, 2020 11:21 AM
To: interest@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

Attachment: test.tar.xz
Description: test.tar.xz

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to