Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. TableView headerDelagate with checkbox
Qt 6.11 is out! See what's new in the release blog

TableView headerDelagate with checkbox

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 224 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shell
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved