给出这段代码,我得到:“对'QScriptEngine::QScriptEngine() 的 undefined reference ”
#include <QtScript/QScriptEngine>
...
QScriptEngine e;
/* Commented out to understand the instantiation error first
e.globalObject().setProperty("t", 123);
bool result = e.evaluate("(t>=2 && t<5) || (t<1)").toBool();
*/
最佳答案
您是否在您的 pro 中声明了脚本?
QT += script
关于c++ - "undefined reference to ' QScriptEngine::QScriptEngine()",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18128157/