[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] disconnectNotify never called
From: Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date: 2008-01-12 17:25:15
Message-ID: 200801121725.15569.phil () riverbankcomputing ! co ! uk
[Download RAW message or body]
On Saturday 12 January 2008, Laurent Hamery wrote:
> Hi guys,
> It seems - for me - as a bug but the virtual method disconnectNotify()
> is never called. And perhaps the connectNotify is called in place of it.
> So .. did I miss something ?
> Im using PyQt 4.2 and python2.4.3 but I cant test with the latest version.
>
> Cheers
> Laurent
>
>
>
>
> #!/usr/bin/env python2.4.3
>
> # Author : Laurent Hamery 2007 @ laurent-h
>
> import sys
>
> from PyQt4.QtGui import *
> from PyQt4.QtCore import *
>
> def connectionTest():
> pass
>
> ###########################################################################
>############### # Disconnection test class
> ###########################################################################
>###############
>
> class DisconnectTest(QPushButton):
> def __init__(self, parent=None):
> QPushButton.__init__(self, parent)
>
> if self.connect(self, SIGNAL('clicked'), connectionTest):
> print 'connection ok'
> if self.disconnect(self, SIGNAL('clicked'), connectionTest):
> print 'disconnection ok'
>
> def connectNotify(self, signal):
> print 'connectNotify'
>
> def disconnectNotify(self, signal):
> print 'disconnectNotify'
>
> if __name__ == '__main__':
> app = QApplication(sys.argv)
> test = DisconnectTest()
> test.show()
> app.exec_()
> del test
disconnectNotify() isn't called for Python signals (maybe it should). Did you
mean 'clicked()' instead of 'clicked'?
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