PDA

View Full Version : Hightlight Text inside QTableWidgetItem



phil333
17th August 2017, 10:33
Hi,

I need to highlight some text inside the cell of a qtablewidget (so a QTableWidgetItem). I do not want to change the color of all the text inside the cell, just some of it. For qlabels I usually insert html tags but that does not work here.

Does anyone have an idea how to do this?

high_flyer
17th August 2017, 11:23
For special rendering in Model View data aware widgets you use delegates:
http://doc.qt.io/qt-5/model-view-programming.html#delegate-classes