QScriptEngine类不能用
代码里写了一句QScriptEngine myEngine;
头文件试了:#include <QScriptEngine>  不行
#include <QtScript/QScriptEngine>  不行
#include <QtScript/QScript>  不行
引用各种 头文件都报错
是不是与.pro文件或者命名空间有关系啊


------解决方案--------------------
是的,.pro里  

QT+=script
------解决方案--------------------
得多看Qt 自带的助手 assistant,上面都有很清楚的解释:

Header:	#include <QScriptEngine>
qmake: QT += script
Since:  Qt 4.3
Inherits: QObject.

相关文章:

  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-30
  • 2022-01-20
  • 2022-02-10
猜你喜欢
  • 2022-12-23
  • 2021-08-20
  • 2021-07-31
  • 2022-12-23
  • 2021-12-30
  • 2021-12-08
相关资源
相似解决方案