[PyQt] QUdpSocket problem

İsmail Dönmez ismail at namtrac.org
Thu Apr 10 07:24:26 BST 2008


Hi all,

In Qt following works :

QUdpSocket sock = new QUdpSocket();
sock.bind(QHostAdress.Any, 4444)

But in PyQt it doesn't like it :

>>> sock = QUdpSocket()
>>> sock.bind(QHostAddress.Any, 4444)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: argument 2 of QUdpSocket.bind() has an invalid type

However if I don't use an enum it works :

>>> sock.bind(QHostAddress("0.0.0.0"), 4444)
True

Any ideas?

Regards,
ismail

-- 
Never learn by your mistakes, if you do you may never dare to try again.


More information about the PyQt mailing list