Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. 请教关于qml treeview 复选框问题
Forum Updated to NodeBB v4.3 + New Features

请教关于qml treeview 复选框问题

Scheduled Pinned Locked Moved Unsolved Chinese
1 Posts 1 Posters 433 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.
  • A Offline
    A Offline
    aisibo
    wrote on last edited by
    #1

    请教大家我写了一个qml treeview,并给它加上了复选框通过下面方式:```

    itemDelegate: CheckBox{
    
                   id:checkbox
    
                 //  tristate:styleData.hasChildren ? true : false
                   indicator.height: 20
                   indicator.width: 20
                   text: styleData.value
                  
    
    
               }
    
    这样可以添加复选框,但是当我想要添加一些逻辑比如选择父项所有子项全选,不知道该怎么操作了,谁能帮帮我?
    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