This is QSS (Qt Style Sheets, a style loosely similar to CSS), to style you can (should) refer to the official Qt documentation (and not your "Wrappers"), in the case of QSS styles:
In your specific case you want to style the selected items, then you have to use the pseudo-States to get the item in focus using :focus
and to get the items (or other sub-controls) you must use the list QSS of sub-controls, in which case I believe to be the ::item
QTableWiget::item:focus {
selection-background-color: transparent;
}
In addition you can experience the paintEvent
, for many things ends up being even simpler than using QSS, but goes from case to case.
The only situations I couldn’t customize something with QSS was about elements within Qwebview (Qtwebkit), where I had to use QProxyStyle
, but that’s because they were elements of which I had no control generated from the HTML rendering engine (Webkit).
He removed the background, but also "deleted" the texts. The text of the item is no longer visible. Also, my table has different color in each row, as in the question image. It would be possible to remove this blue background keeping the current color of the item?
– JeanExtreme002
@Jeanextreme002 tries the
background-color: transparent;
, as soon as there’s time I’ll test.– Guilherme Nascimento