QtextEdit: custom text edition
I'd like to create a text editor allowing a user to add variables from a predefined list.
- Once the variable is added, it should be treated as a block, it means :
- prevent the user from editing the text content,
- allow deleting the whole variable only
- prevent the cursor from blinking when the user click inside the text content
- I would also need to format it in a nice way (with a custom font style and a border around it).
As a newbie with QTextEdit, I'd like some suggestion on which class could help me to achieve my goal.
Thanks by advance
I assume you can do it with
Maybe you can cheat at bit and use images
Render nice text and border to image and show it. Im not sure if you can
interact with it. like clicking so maybe your own widget is easier.
Very nice. It's definitely be a good start !