How to interpret math operation in a string [Solved]
General and Desktop
4
Posts
2
Posters
3.0k
Views
1
Watching
-
wrote on 28 Jan 2011, 07:57 last edited by
Hi all,
I have a QString with something like this:
@
( ;1; + ;2; + ;3; + ;4; + ;5; + ;6; + ;7; + ;8; ) / 8
@where the numbers between ';' character corresponds to some variables (in my c++ application) while the other numbers are simple arithmetical number.
What is the fastest way to get the result from the operation described in the string? -
wrote on 28 Jan 2011, 08:09 last edited by
do it with QtScriptEngine i think
-
wrote on 28 Jan 2011, 08:29 last edited by
[quote author="Felix" date="1296202165"]do it with QtScriptEngine i think[/quote]
Thanks, I never used this object but it seems interesting.
Now I try. -
wrote on 28 Jan 2011, 13:22 last edited by
Yes it works!!!
I love Qt!
2/4