Qt中出现‘class QApplication’ has no member named ‘setMainWidget’

主要是因为qmake使用的是qt4的版本,而在qt4中已经不支持setMainWidget这个函数了,解决方法:在所有包含头文件的最前面添加#define QT3_SUPPORT,可以提供对qt3的支持,这样就可以解决问题了。

相关文章:

  • 2021-12-21
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
  • 2021-11-21
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-29
  • 2021-11-11
  • 2021-07-29
  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
相关资源
相似解决方案