QML how to use mouse hover together with styleData.selected
问题 I'm trying to build a simple delegate for rows in TableView. I want it to show a border in case hovered with mouse and leave a border in cases it's selected. See code below: Component { id: rowDelegate Item { height: 40 Rectangle { id: rowRectSel anchors.fill: parent color: "grey" radius: 2 opacity: 0.4 border.width: 3; visible: styleData.selected } Rectangle { id: rowRect anchors.fill: parent color: "grey" radius: 2 opacity: 0.4 border.width: 1; visible: !styleData.selected } MouseArea { id: