在使用QtcpSocket和QTcpServer的时候使用
#include < QTcpServer>
#include < QTcpSocket>
却提示NO fsuch file or directory
原因:需要在文件的.pro中添加network模块
如下即可:

这样就没有问题了

本文解决在使用QtcpSocket和QTcpServer时遇到的找不到文件目录问题。通过在项目配置文件.pro中正确添加network模块,可以避免此类错误并实现正常运行。
在使用QtcpSocket和QTcpServer的时候使用
#include < QTcpServer>
#include < QTcpSocket>
却提示NO fsuch file or directory
原因:需要在文件的.pro中添加network模块
如下即可:

这样就没有问题了

5827

被折叠的 条评论
为什么被折叠?