QScriptEngine evaluate
Solved
General and Desktop
-
Hi,
i try to compare with QScriptEngine:
QString Ergebnis = engine.evaluate(" 2 < 3 ? "OK" : "BAD").toString();
I get an Error
The variable OK" not exist
What should i do?
-
@NotYourFan You are aware that you have to escape " inside strings?
QString Ergebnis = engine.evaluate(" 2 < 3 ? \"OK\" : \"BAD\"").toString();
-
Thanks !!!