Yes, tried without stylesheet with no luck (just tried it again to see if I missed something).  Thought about that as it feels like that Role is disabled somehow.<br><br><div class="gmail_quote">On Fri, Jun 24, 2011 at 7:26 PM, David Boddie <span dir="ltr"><<a href="mailto:david@boddie.org.uk">david@boddie.org.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Fri Jun 24 20:30:32 BST 2011, Marc Rossi wrote:<br>
<br>
> I have a model/view app with a QTableView that I would like to have columns<br>
> 2, 3 & 4 shaded a different color than the rest.  My model sub-classes<br>
> QAbstractTableModel and I also use a QSortFilterProxyModel.   I assumed I<br>
> could just override the data() method in my QAbstractTableModel derived<br>
> class, returning the correct QBrush when called with role =<br>
> Qt.BackgroundRole, but my data method NEVER gets called with this role.<br>
> I currently use a stylesheet to set the entire background of the<br>
> QTableView.<br>
<br>
</div>Just a thought: have you tried it without the stylesheet?<br>
<br>
David<br>
_______________________________________________<br>
PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br>
</blockquote></div><br>