[PyKDE] Qobject.disconnect
Phil Thompson
phil at river-bank.demon.co.uk
Sun Dec 16 16:05:47 GMT 2001
Jonathan Gardner wrote:
>
> I searched the archives for any info on this, but I couldn't seem to find
> anything useful.
>
> I have a situation where a QObject connects to another Qobject mutiple times.
> I would like to disconnect all of the connections using wildcards (as per the
> Qt documentation for "QObject::disconnect".
>
> It would seem logical to do this:
>
> QObject.disconnect(emitter, None, self, None)
>
> However, it complains as thus:
>
> QObject.disconnect(self._bm, None, self, None)
> TypeError: Argument 2 of QObject.disconnect() has an invalid type
>
> So I tried passing in null strings:
>
> QObject.disconnect(self._bm, "", self, "")
> TypeError: Argument 2 of QObject.disconnect() has an invalid type
>
> Hummm... so I decided to try and see if QObject.disconnect worked at all:
>
> QObject.disconnect(self._bm, PYSIGNAL('calc_weight()'), self,
> self.populate_walk)
> TypeError: Argument 4 of QObject.disconnect() has an invalid type
>
> Yep, it looks like it is not working at all.
>
> The documentation isn't much help. It only says that "disconnect" and
> "connect" are both unimplemented.
>
> My version is pyqt-2.5.
>
> The question is this: Is disconnect implemented? If so, how does one use it?
Disconnect is implemented - but not the full Qt functionality, only the
disconnect of a single signal. Send me a simple test program that
demonstrates any bugs you think might be there.
Phil
More information about the PyQt
mailing list