hi.

i want to use the 'universal disconnect', but can't get it to work. maybe i've missed something. i want to disconnect several python-slots from python-signals.

any comments?

thanks in advance.

cheers,

alexander

ps: here is what i've tested:

from PyQt4 import QtCore

class A(QtCore.QObject):
    def __init__(self, i):
        QtCore.QObject.__init__(self)
        self.i = i

    def slotBla(self):
        print "bla(%i)" % self.i

    def emitBla(self):
        self.emit(QtCore.SIGNAL("bla()"))

if __name__ == '__main__':
    # build some instances
    a1 = A(1)
    a2 = A(2)

    # connect them
    a2.connect(a1, QtCore.SIGNAL("bla()"), a2.slotBla)

    # test the signal
    a1.emitBla()

    # how to disconnect? none of the following works
    a2.disconnect()
    a2.disconnect(QtCore.SIGNAL("bla()"))

_______________________________________________
PyKDE mailing list    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to