QT入门,while parsing target library list: not well-formed (invalid token)解决

来源:互联网 发布:mac 网页添加到收藏夹 编辑:程序博客网 时间:2024/06/11 19:35

  在学习TCP服务器例程中,在编译完成后遇到这段粉红色文字

while parsing target library list: not well-formed (invalid token)

主要问题在于信号连接有问题

源码中SIGNAL的disconnected()不能被编译器正确识别

connect(this,SIGNAL(disconnected()),this,SLOT(slotdisconnected()));
改成:

connect(this,SIGNAL(QAbstractSocket::disconnected()),this,SLOT(slotdisconnected()));

问题就解决了

0 0