[PyQt] Having a problem with QTcpSocket

Hans-Peter Jansen hpj at urpla.net
Mon Nov 23 20:01:38 GMT 2009


On Monday 23 November 2009, 19:39:36 Nick Gaens wrote:
>  Hans-Peter Jansen schreef:
>
>  Hmm.. That doesn't seem to work :-S..
>
>  self.server.listen(QtNetwork.QHostAddress.Any, 55555):
>        TypeError: argument 1 of QTcpServer.listen() has an invalid type

It's not that uncommon. Try:

	self.listen(QtNetwork.QHostAddress(QtNetwork.QHostAddress.Any), 55555)

Phil, is it possible to eliminate this useless wrapper?

Pete



More information about the PyQt mailing list