Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Importing files with evaluate() function

$
0
0
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?

Viewing all articles
Browse latest Browse all 4972

Trending Articles