1
votes

I am trying to change the TableView highlight color from the system's default color to say red. Can this be done without editing the rowDelegate? Also I tried changing the highlightedTextColor but this didn't do anything.

1
I don't think that's possible for now with TableView based on the documentationkoopajah

1 Answers

0
votes
TableView {
        rowDelegate: Rectangle {
            SystemPalette {
                id: systemPalette
                colorGroup: SystemPalette.Active
            }
            color: {
                var baseColor = styleData.alternate ? systemPalette.alternateBase : systemPalette.base
                return styleData.selected ? "your-color-here"/*systemPalette.highlight*/ : baseColor
            }
        }
}