MouseArea does not accpect Qt.LeftButton in TableView's header delegate.
-
Within my TableView I use the following headerDelegate:
Component { id: headersDel Text { id: headerItem text: styleData.value MouseArea { id: actionArea anchors.fill:parent acceptedButtons: Qt.LeftButton | Qt.RightButton onClicked: { console.log("headerItem.onClicked") } } }
But clicks with left mouse button do not create a event. How to achieve this?
-
Within my TableView I use the following headerDelegate:
Component { id: headersDel Text { id: headerItem text: styleData.value MouseArea { id: actionArea anchors.fill:parent acceptedButtons: Qt.LeftButton | Qt.RightButton onClicked: { console.log("headerItem.onClicked") } } }
But clicks with left mouse button do not create a event. How to achieve this?
@th.thielemann
TableView
already has a clicked signal. You can use that.