|
1Qter豆
程序就是按照QT5中的资料写的
报错如下:
E:\qt\PPtcpServer\tcpsocket.cpp:25: error: C2660: “QAbstractSocket::disconnected”: 函数不接受 1 个参数
void TcpSocket::datadisconnected(){ emit disconnected(this->socketDescriptor());}
E:\qt\PPtcpServer\tcpserver.cpp:11: error: C2511: “void TcpServer::incomingConnection(int)”:“TcpServer”中没有找到重载的成员函数
void TcpServer::incomingConnection(int socketDescriptor){ TcpSocket *tcpSocket = new TcpSocket(this); connect(tcpSocket,SIGNAL(updateClients(QString,int)), this,SLOT(updateClients(QString,int))); connect(tcpSocket,SIGNAL(disconnected(int)), this,SLOT(tcpDisconnected(int)));
tcpSocket->setSocketDescriptor(socketDescriptor); tcpSocketList.append(tcpSocket); //在list末尾插上数据
}
E:\qt\pptcpserver\mainwindow.h:6: error: C1083: 无法打开包括文件:“tcpserver.h”: No such file or directory
#include <tcpserver.h>
|
|