[PyQt] Slot connections fail with newest snapshot

Phil Thompson phil at riverbankcomputing.com
Sat Jul 16 17:10:55 BST 2016


On 14 Jul 2016, at 10:32 am, Florian Bruhin <me at the-compiler.org> wrote:
> 
> Hi,
> 
> I just tried PyQt5_gpl-5.7.dev1607121154 and sip-4.18.1.dev1607032332
> (with a debug Python build FWIW), and with the attached code I get:
> 
>    QObject::connect: Cannot connect QCoreApplication::aboutToQuit() to (null)::lot()
>    Traceback (most recent call last):
>      File "foo.py", line 13, in <module>
>        app.aboutToQuit.connect(obj.slot)
>    TypeError: connect() failed between aboutToQuit() and lot()
> 
> It looks like there's a off-by-one error somewhere, as the method is
> called "slot", not "lot"?
> 
> I noticed it doesn't happen without @pyqtSlot, and it also doesn't
> happen with a function instead of a method.

The current behaviour is different, but what are you expecting to happen (given your class does not inherit from QObject)?

Phil


More information about the PyQt mailing list