[Interest] **SPAM**d Re: Setting current item text color via stylesheet in QTableView for SelectRows

Reinhardt Behm rbehm at hushmail.com
Mon Aug 13 07:01:43 CEST 2018


Hi Patrick,

it works for me with this style.

The attached picture show two selected rows (0 and 2) and one current, 
unselected cell (1).

-- 
Best Regards

Reinhardt Behm


On Sunday 12 August 2018 21:06:28 Patrick Stinson wrote:
> Don’t forget to reply to all.
> 
> Your example is interesting, and it does solve the problem of making the
> selected and current item stand out. I suppose there isn’t a way to do this
> and also show the current item when it is not selected.
> 
> How strange that you can’t combine selectors as in CSS.
> 
> > On Aug 12, 2018, at 8:42 PM, Reinhardt Behm <rbehm at becker.com.tw> wrote:
> > 
> > QTableView::item
> > { color:black; background-color:white; }
> > QTableView::item:selected
> > { color:green; }
> > QTableView::item:focus
> > { color:blue;  }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: style.png
Type: image/png
Size: 6252 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180813/40f75741/attachment.png>


More information about the Interest mailing list