Unsolved TableView headerDelagate with checkbox
-
here is my code:
headerDelegate:Rectangle{
width:100
height:30
Text{
id:textid
visible: !(styleData.column===0)
}
CheckBox{
id:checkid
visible: styleData.column===0
property bool mypressed: styleData.pressed
onMypressedChanged: {
if(mypressed){
console.log("onMypressedChanged")
checked=!checked
}
}
}
}when i click the checkbox , the console will print twice onMypressedChanged
is there someone can help me ?
thanks