Hi evryone,

I am faily new to QT so please dont shoot me for asking things that may be "dumb".


So to my question, I want to create a Table or List (to me a table with one colum) in wich i will have single lines of Script-Code, so I want them to be Highlighted.

I have already tried two things, using the QTextEdit as a delegate and a widget.

As a Widget id did exactly what I wanted, but I am worried that it might hurt performance as the table/List grows.

Because of that i would prefer to use the delegate...

When i tried the TextEdit delegate with syntax higlighter it only worked when i was in "editmode".
But as soon as the delegate was released the formating was lost... Since the table only takes plain text (?).

I have found little on the net to help me acomplish this. Only option that I have found is to create my own TableWidget subclass and reimplement the paint method. Is this truly the best way or is there something easier?

Greets,

Eric