title: QML ComboBox Witth CheckBox
body: <p>I Want to Design ComboBox(Dynamic) in Qml having checkbox in it.
  when i will check thecheckbox which is in combobox, i want to add a element in listview which under the combox.
  please help me with that</p>
  <p>example image is attached below</p>
  <p><img src="https://i.stack.imgur.com/28qhK.png" alt="enter image description here" /></p>
  <pre><code>ApplicationWindow {
      id: applicationWindow
      visible: true;
      width: screen.width;
      height: screen.height;
  
  
  
  
      ComboBox {
          id: comboBox
          width: parent.width
          height: parent.height/20
          anchors.left: parent.left
          anchors.right: parent.right
  
          anchors.leftMargin: 40
          anchors.rightMargin: 40
          anchors.top: parent.top
          anchors.topMargin: 10
          onCurrentIndexChanged: {
              var receivedData = {
                  imageSource: &quot;bulb&quot;,
                  loadType: &quot;Light&quot;,
                  loadName: &quot;▶BedRoom1&quot;,
                  loadStatus: false,
                  macId: &quot;00:17:F1:00:00:B8_01&quot;,
              };
              var receivedData1 = {
                  imageSource: &quot;ac&quot;,
                  loadType: &quot;AC&quot;,
                  loadName: &quot;▶BedRoom21&quot;,
                  loadStatus: true,
                  macId: &quot;00:17:F1:00:00:B8_02&quot;,
              };
  
              var receivedData2 = {
                  imageSource: &quot;dimmer&quot;,
                  loadType: &quot;Dimmer&quot;,
                  loadName: &quot;▶Hall1&quot;,
                  loadStatus: false,
                  macId: &quot;00:17:F1:00:00:B8_03&quot;,
              };
              var receivedData3 = {
                  imageSource: &quot;fan&quot;,
                  loadType: &quot;Fan&quot;,
                  loadName: &quot;▶Hall1&quot;,
                  loadStatus: false,
                  macId: &quot;00:17:F1:00:00:B8_04&quot;,
              };
  
  
              console.debug(combomodel.get(currentIndex).text)
              if(combomodel.get(currentIndex).text === &quot;Light&quot;)
              {
                  loadListView(receivedData)
              }
              else if(combomodel.get(currentIndex).text === &quot;Bulb&quot;)
              {
                  loadListView(receivedData)
              }
              else if(combomodel.get(currentIndex).text === &quot;Ac&quot;)
              {
                  loadListView(receivedData1)
              }
              else if(combomodel.get(currentIndex).text === &quot;Dimmer&quot;)
              {
                  loadListView(receivedData2)
              }
              else if(combomodel.get(currentIndex).text === &quot;Fan&quot;)
              {
                  loadListView(receivedData3)
              }
  
          }
  
  
  
          model: ListModel {
              id:combomodel
              ListElement {
                  //text:&quot;Select Device&quot;
                  name: &quot;&quot;
                  checked: false
              }
  
          }
          function loadListView({imageSource,loadType,loadName,loadStatus,macId})
          {
  
              listmodel.append({&quot;src&quot;: imageSource,&quot;load&quot;:loadType,&quot;label&quot; : loadName,&quot;checkedStatus&quot; : loadStatus,&quot;macStatus&quot; :macId })
          }
  
          delegate: Item {
              width: parent.width
              implicitHeight: checkDelegate.implicitHeight
  
              CheckDelegate {
                  id: checkDelegate
                  width: parent.width
                  text: model.name
                  highlighted: comboBox.highlightedIndex === index
                  checked: model.checked
                  onCheckedChanged:
                  {
                      model.checked = checked
  
                  }
  
              }
          }
  
  
      }
  
  
      function appendData()
      {
          combomodel.append({ &quot;name&quot;:&quot;S&quot; } )
          combomodel.append({ &quot;name&quot;:&quot;U&quot; } )
          combomodel.append({ &quot;name&quot;:&quot;R&quot; } )
          combomodel.append({ &quot;name&quot;:&quot;A&quot; } )
          combomodel.append({ &quot;name&quot;:&quot;J&quot; } )
          combomodel.append({ &quot;name&quot;:&quot;T&quot; } )
  
  
      }
  
      Component.onCompleted: {
          getModuleTableData()
      }
  
      ListView {
          id:listview
          anchors.top: comboBox.bottom
          anchors.bottom: parent.bottom
          anchors.left: parent.left
          anchors.right: parent.right
          anchors.leftMargin: 5
          anchors.rightMargin: 5
          anchors.topMargin: 10
          flickableDirection: Flickable.VerticalFlick
          boundsBehavior: Flickable.StopAtBounds
          clip: true
  
          //delegate: deviceDelegate
  
          model: ListModel{
              id:listmodel
          }
          focus: true
          ScrollBar.vertical: ScrollBar {}
      }
  
      Dbadaptor{
          id:dbadaptor
      }
      function getModuleTableData()
      {
          console.log(&quot;In getModuleTableData() function&quot;)
          var data = dbadaptor.fetchModuleTable()
          console.log(&quot;Data: &quot;,data)
          console.log(&quot;length&quot;,data.length)
          for(var i = 0; i&lt; data.length;i++)
          {
              console.log(&quot;Name: &quot;,data[i])
              //if(data[i] == &quot;&quot;)
              combomodel.append({&quot;name&quot;: '&lt;b&gt;'+data[i]+'&lt;/b&gt;',&quot;ckecked&quot;: &quot;&quot;})
              var dataload = dbadaptor.fetchLoadDataForGroup(i+1)
              console.log(&quot;loadData :&quot;,dataload)
              console.log(&quot;loaddatalength: &quot;,dataload.length)
              for(var j = 0; j&lt;dataload.length;j++)
              {
                  combomodel.append({&quot;name&quot; : dataload[j],&quot;checked&quot;: false})
              }
          }
  
      }
  }
  </code></pre>
  <p>In above code i am appending data in ComboBox with checkbox,when i click on CheckBox,I want to print a debug Message.
  And in ComboBox where 8x1 device name is there i dont want to append checkBox with respect to it.</p>