This still doesn’t work from with this code:
QQmlEngine engine;
QJSValue res = engine.evaluate(".import \"test.js\" as Test");
if(res.isError()) {
std::cout << "uncaught exception: \n" << res.toString().toStdString() << "\n";;
std::cout << res.property("lineNumber").toInt() << "\n";
std::cout << res.property("fileName").toString().toStdString() << "\n";
}
I get the following error:
uncaught exception:
SyntaxError: Syntax error
1
I have two comments about this:
Why doesn’t this work?
Why don’t I get a better error message?
↧