1

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.

user2887117
  • 203
  • 2
  • 12

1 Answers1

0
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
            }
        }
}
roberto.buratti
  • 2,487
  • 1
  • 16
  • 10