Hello,

i have a QLineEdit widget (ui->window.numberOfElements) that contains the value 0.
How to increment that QLineEdit value by one? i means get the value from the QLineEdit and do a +1 an inserted again in the QLineEdit.

My problem isn't about reading or inserting in the QLineEdit but about returning the value with .text() and casting it to "Int" (number) so i can increment +1.

I tried to cast the return value to int ui->window.numberOfElements.toInt()+1, and (int) ui->window.numberOfElements + 1 but that didn't work.

the first one didn't work ssince the value reamins 0 and for the second one i get "invalid cast from type QString to type int"

Does any one have an indea on how to do this?
THanks.
K|Z