overriding the qspinbox class to evaluate mathematical expressions QT

94 Views Asked by At

I have a parser for math expressions. I need to redefine the QDoubleSpinBox class so that metamatics can be entered into it even after pressing enter. He figured them out. The problem is that the textFromValue method always works on input. That is, entering sin (10) +10 will calculate two values. First sin (10) and then sin (10) +10. I need it to be calculated by pressing enter or after changing the focus, but when changing the focus, the text in the field itself did not change, to the calculated expression that was written there. And the value should be received via a signal, changeValue.

0

There are 0 best solutions below