title: draw background on custom QStyledItemDelegate like
body: <p>I have a table and am trying to add a custom delegate following the <a href="http://doc.qt.io/qt-5/qtwidgets-itemviews-stardelegate-example.html" rel="nofollow noreferrer">example from the qt documentation</a>. 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 <em>rating</em> cell and the rest of the row). What is the easiest way to <em>draw the background like the standard delegate does</em>?</p>
  
  <p>For <code>QItemDelegate</code> there seems to be <a href="http://doc.qt.io/qt-5/qitemdelegate.html#drawBackground" rel="nofollow noreferrer"><code>drawBackground</code></a>, however there is no such function for <code>QStyledItemDelegate</code>. And unfortunatly <code>drawBackground</code>, 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.</p>
  
  <p><img src="https://i.stack.imgur.com/P04mv.png" alt="enter image description here"></p>