我只想用一个特定的地址设置我的 QTcpServer。我已经用这段代码试过了,但它不起作用......
server.listen(QHostAddress::setAddress("127.0.0.1"),8888);
这是错误:
Cannot call member function 'bool QHostAddress::setAddress(const QString&)' without object
server.listen(QHostAddress::setAddress("127.0.0.1"),8888);
^
谁能帮我?