[PyQt] Background color for cells in QTableView
mrossi19 at gmail.com
Sat Jun 25 03:54:48 BST 2011
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
On Fri, Jun 24, 2011 at 7:26 PM, David Boddie <david at boddie.org.uk> 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
> > 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?
> PyQt mailing list PyQt at riverbankcomputing.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt