我正在使用Qt5.4.1,并实现服务器客户端应用程序。 在QTcpServer既可类中的方法:在Qt5.4.1中找不到类型qintptr
void incomingConnection(int socketDescriptor);
具有整数类型为socketDescriptor
,但对于Qt5.5,这种方法已经改变,并具有以下声明:
void incomingConnection (qintptr socketDescriptor);
的问题是,我的编译器没有找到typedef qintptr
。错误消息是qintptr尚未声明。
我已经加入了头文件
#include <QtGlobal>
但是编译器仍然没有找到这种类型。
当我将qintptr
更改为quintptr
时,编译器发现它,但此类型给出类型不匹配错误。我怎么解决这个问题?
也许您已经安装了多个Qt? – danielfranca
你可以在一个新的和小的项目中重现错误吗? – danielfranca
@danielfranca当我新的小项目,e,g。 foprtuneServer示例错误未生成,并且小项目编译和运行没有问题 –