hi
i have a C++ class that evaluate an arithmitic expression like 9+8-(9/5)
in the consol i have a good result.
but if i instantiate my class in a Qt project and pute the result in QLineEdit i have 0
a slot that instantate and calclate the expression :
void calculatrice::evaluateClicked()
{
arithmeticExpression *e = new arithmeticExpression( inputeLE->text().toStdString() );
st.setNum( e->evluate() );
outputeLE->setText( st );
}
void calculatrice::evaluateClicked()
{
arithmeticExpression *e = new arithmeticExpression( inputeLE->text().toStdString() );
QString st;
st.setNum( e->evluate() );
outputeLE->setText( st );
}
To copy to clipboard, switch view to plain text mode
evluate() return a double
thanks
++
Bookmarks