How do you go about selecting a specific line in a QTextEdit and changing say... The font colour to green
I am using a QTextEdit widget to display the content of a file, a sequence of commands being sent over rs232. I would like to provide some visual feedback as to what line is being executed, say change the text colour.
I am able to change the text file of text being appended to a QTextEdit (for a log I display) but that doesn't work.
I have been looking into Qcursors but am a bit lost
I think that you can afford generating a new TextEdit content from the relevant data, every time something changes. That should be very easy to implement. QCursors and stuff like that is good for editable QTextEdits which is not true in your case. And there is no guarantee that it will be faster at all.
format a specific line in a QtextEdit