非常感谢,正在学着使用qt的手册,高手一下就指点出了症结所在,我找了好久啊
但还是出现了点问题,想再请教一下
我的这句程序是这样的
textEdit->setText(myAddress.toString(server.serverAddress()));
textEdit->setText()用来在文本框里显示IP
server.serverAddress是我定义的QTcpServer类一个实例所返回的一个QHostAddress类的IP
myAddress是QHostAddress类的实例
这么转换,结果还是出错,请问这句程序该怎么写合适呢,谢谢
src/dialogimpl.cpp:19: error: no matching function for call to `QHostAddress::
toString(const char[10])'
../../../Qt/4.4.3/src/network/kernel/qhostaddress.h:99: error: candidates are:
QString QHostAddress::toString() const