I have a table and am trying to add a custom delegate following the example from the qt documentation. However, while the background color seems to be correct the overlay seems to be missing, in case the row is selected (Note the difference in the column with the blue background between the rating cell and the rest of the row). What is the easiest way to draw the background like the standard delegate does?
For QItemDelegate
there seems to be drawBackground
, however there is no such function for QStyledItemDelegate
. And unfortunatly drawBackground
, also ommits the slightly brighter rectangle (1 px smaller on top and bottom than the background) which you see in the cells to the left of it.