[PyQt] Disconnect SLOT

Kermit stef.kermit at gmail.com
Mon Sep 10 08:36:33 BST 2007


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20070910/8d1b93e4/attachment.html


More information about the PyQt mailing list