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.

On Fri, Jun 24, 2011 at 7:26 PM, David Boddie <[email protected]> wrote:

> On Fri Jun 24 20:30:32 BST 2011, Marc Rossi wrote:
>
> > I have a model/view app with a QTableView that I would like to have
> columns
> > 2, 3 & 4 shaded a different color than the rest.  My model sub-classes
> > QAbstractTableModel and I also use a QSortFilterProxyModel.   I assumed I
> > could just override the data() method in my QAbstractTableModel derived
> > class, returning the correct QBrush when called with role =
> > Qt.BackgroundRole, but my data method NEVER gets called with this role.
> > I currently use a stylesheet to set the entire background of the
> > QTableView.
>
> Just a thought: have you tried it without the stylesheet?
>
> David
> _______________________________________________
> PyQt mailing list    [email protected]
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to