I am really stuck up with a task relating to Qt GraphicsView. Any help or suggestions will be highly appreciated.
In my QGraphicsView application, I have a few editable QGraphicsTextItems that I have added to the scene. I need the following functionality:
- Setting validator for float so that the user does not by mistake enter a character or new line in that text item.
- Emitting a signal once the text is changed by the user.
Can anyone please suggest how I can implement this in my application? I have tried real hard but I am not able to find anything suitable. If there is any alternative or workaround, I'll be grateful to know.
- Setting validator for float so that the user does not by mistake enter a character or new line in that text item.
It doesn't look like that there is a validator. I wouldn't use one. Just let the user type whatever he wants to and tell him later when the data is somehow used what he did wrong if