[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] PyQt5: Connect/disconnect to/from (non slot) builtin method
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2016-02-15 13:46:51
Message-ID: 2F6BCE9B-429E-41C7-BBB7-B0159A0369FF () riverbankcomputing ! com
[Download RAW message or body]

On 15 Feb 2016, at 9:09 am, Ales Erjavec <ales.erjavec324@gmail.com> wrote:
> 
> Hello
> 
> In PyQt5 (5.5.1) connecting a signal to a builtin method (which is not
> defined as a slot)
> and then disconnecting it raises a
> 
>   TypeError: 'builtin_function_or_method' object is not connected
> 
> 
> ####
> 
> from PyQt5 import QtCore
> 
> class Obj(QtCore.QObject):
>    signal = QtCore.pyqtSignal(str)
> 
> obj = Obj()
> 
> obj.signal.connect(obj.setObjectName)
> obj.signal.disconnect(obj.setObjectName)  # raises an error
> 
> ####
> 
> The same code works in PyQt4.

Should be fixed in tonight's snapshot.

Thanks,
Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic