[PyQt] Disconnect SLOT

Phil Thompson phil at riverbankcomputing.co.uk
Mon Sep 10 08:59:28 BST 2007


On Monday 10 September 2007, Kermit wrote:
> hi all,
>
> i try to disconnect a tcpSocket SLOT
>
> connection in __init__
>         self.connect(self.tcpSocket, QtCore.SIGNAL("readyRead()"),
> self.readyRead)
>
> and for disconnect :
>
>     def readyRead(self):
>         msg= self.tcpSocket.readAll()
>         if msg == '200 3.00 Ready\r\n' :
>             self.MyPrint('Manager pret')
>             self.disconnect(self.tcpSocket, QtCore.SIGNAL("readyRead()"),
> self.readyRead)
>             .......................
>
> and i have this error :
>
> self.disconnect(self.tcpSocket, QtCore.SIGNAL("readyRead()"),
> self.readyRead )
> TypeError: disconnect() takes exactly 1 argument (4 given)
>
>
> i use PyQt Py2.5 and QT 4.2
>
> thx for your help
>
> Kermit

As the standard disconnect() takes more than 1 argument it is unlikely that it 
is giving the message. Do you have another disconnect() method?

Phil


More information about the PyQt mailing list