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

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

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

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

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

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

 

相关文章:

  • 2022-01-24
  • 2021-10-25
  • 2022-12-23
  • 2022-02-16
  • 2021-11-09
  • 2022-12-23
  • 2021-12-07
  • 2021-05-29
猜你喜欢
  • 2021-11-01
  • 2022-12-23
  • 2021-04-22
  • 2021-05-27
  • 2021-10-04
  • 2021-09-13
  • 2021-05-27
相关资源
相似解决方案