我是参考了网上的例子的:如下:
xp下可以运行,client可以连接上
tcpServer = new QTcpServer(this);
if (!tcpServer->listen(QHostAddress("192.168.1.168"), 6666)) {
qDebug() << tcpServer->errorString();
close();
}
但是在ubuntu下一样的代码,启动时却提示如下:
"The address is not available"
我的ubuntu是虚拟机,会不会有影响?
谢谢