QT编译错误:member access into incomplete type 'QMouseEvent'

想在QT程序中使用鼠标事件,添加重载的响应函数,并实现后,一直提示 member access into incomplete type 'QMouseEvent'

既然使用了QMouseEvent类,就应该将其头文件包含进去,在.h中加入: #include <QMouseEvent> 问题解决!

以后遇到类似的记得包含其对应的头文件!

 

posted on 2019-01-22 17:29  我来乔23  阅读(14087)  评论(0编辑  收藏  举报

导航