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

List:       pykde
Subject:    Re: [PyQt] Overloading new-style signal
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2011-02-22 14:49:36
Message-ID: 382f419b38e87816f16e8594a22ce6b6 () localhost
[Download RAW message or body]

On Sat, 19 Feb 2011 17:56:35 +0100, Knacktus <knacktus@googlemail.com>
wrote:
> Hi guys,
> 
> I don't get overloading of new-style signals to work. I can't spot the 
> mistake ... my eyes don't see anything anymore ;-).
> 
> Any help is highly appreciated.
> 
> Cheers,
> 
> Jan
> 
> Here's an example:
> 
> 
> import PyQt4.Qt as Qt
> import PyQt4.QtCore as QtCore
> 
> 
> class ItemsChangedNotifier(Qt.QObject):
> 
>      items_changed = QtCore.pyqtSignal([list], [dict])

The problem is that PyQt uses the same C++ class to represent a list and a
dict, so the above is actually defining two signals with the same
signature. The solution is to define them as separate signals.

I'll clarify the documentation.

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://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