回帖:你好,我header的信号点击出发四次怎么回事啊?
headerDelegate: Item {
height: 20
anchors.left: parent.left
anchors.right: parent.right
CheckBox {
id: activateAllEvents
anchors.centerIn: parent
property bool myPressed: styleData.pressed
checked: true
visible: styleData.column === 4 // Show only in the 4th column
activeFocusOnPress: true
text: ""
onMyPressedChaged: {
if(myPressed)
checked = !checked;
}
}
}