[PyKDE] PyKDE: Can't connect to signal

Phil Thompson phil at riverbankcomputing.co.uk
Wed Oct 27 10:18:04 BST 2004


> Hello,
>
> First of all, this should not be a problem with WIds because I am
> connecting to signals like activeWindowChanged(WId) without problems.
>
> With PyKDE 3.11.3 (hand compiled) and kde 3.2.3 from Mandrake 10.1, I am
> trying to connect to the signal
>
>   void KWinModule::windowChanged ( WId id, const unsigned long *
> properties)
>
> or at least the deprecated
>
>   void KWinModule::windowChanged (WId id, unsigned int properties)
>
> I have tried to connect with
>
>  SIGNAL("windowChanged(WId, unsigned long)")
>
>  SIGNAL("windowChanged(WId, const unsigned long*)")
>
>  SIGNAL("windowChanged(WId, unsigned int)")
>
> with no success (RuntimeError: Signal has wrong argument types for slot)
>
>
> What's happening? Thanks for any help,

It's a SIP "feature". In signal arguments SIP deals with the underlying
data type (ie. whatever WId is typedef'd from), but Qt deals with WId
itself. So, between them, they can't agree. This will be fixed in the next
release of SIP.

Phil




More information about the PyQt mailing list