PDA

View Full Version : QExpressionEvaluator



vajindarladdad
9th March 2009, 14:33
Hi all experts ,Masters
I am developing a scientific calculator , in which i have to execute an expression.
I used QScriptEngine and QScriptValue classes .
It Works fine for simple arithmatics .
I have used Math.sin() , Math.cos() , Math.PI for executing the desired operations Math.pow(2,3) function for finding powers , but i want to use '^' operator instead of that function.

Is there any other class which will reduce my work.

I found QExpressionEvaluator , it is in a QBaseModule module .Please tell steps me how to use ExpressionEvaluator .
I am using Qt 4.4 and it does'nt have QExpressionEvaluator.

Lykurg
10th March 2009, 13:29
Hi,

Qt itself doesn't provide a very good math architecture. For your calculator you should look for better libraries, that do the calculating (Note: Not the gui!). You may have a look at Eigen (http://eigen.tuxfamily.org).

Lykurg