PDA

View Full Version : How to compute a number with string of operation in QML



nestuser
19th September 2012, 13:02
Hi,

Is this possible to do a mathematical computation with a number and a string of expression??
for example I used a string variable like


property string user_script: "*1"


can i compute this string to a number variable?

Thanks in advance

spirit
19th September 2012, 13:15
Do you need to convert string to int? If so use parseInt, parseFloat functions.