[PyKDE] Qobject.disconnect

Jonathan Gardner jgardn at alumni.washington.edu
Sun Dec 16 06:27:30 GMT 2001


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?

Jonathan




More information about the PyQt mailing list