Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-42470

When I put a ComboBox in a Listviews delegate and the listview grows beyond the size of the parented item the applications crashes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • 5.4.0
    • 5.2.0
    • Quick: Controls 1
    • None
    • windows 7 running in qt creator 3.2

    Description

      When I put a ComboBox in a Listviews delegate and the listview grows beyond the size of the parented item the applications crashes. See for example the code below. I do have a custom combobox which has nothing to do with qtquick controls and that works fine. It seems to be depended on the size of the parent (window?). It crashes with the message that some vector has gone out of bounds.

      import QtQuick 2.2
      import QtQuick.Controls 1.1
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 180
          title: qsTr("Test window")
      
          Rectangle {
              width: 360
              height: 140
      
      
              ListModel {
                  id: amodel
      
                  ListElement {
                      name: "one"
                  }
                  ListElement {
                      name: "two"
                  }
                  ListElement {
                      name: "three"
                  }
                  ListElement {
                      name: "four"
                  }
                  ListElement {
                      name: "five"
                  }
                  ListElement {
                      name: "six"
                  }
                  ListElement {
                      name: "seven"
                  }
                  ListElement {
                      name: "eight"
                  }
                  ListElement {
                      name: "nine"
                  }
                  ListElement {
                      name: "ten"
                  }
      
              }
      
              ListView {
                  anchors.fill: parent
                  model : amodel
                  delegate:
                      Item  {
                      width : 100
                      height : 20
                      Text{
                          anchors.fill: parent
                          text : name
                      }
                      ComboBox {
                          height : 18
                          width : 150
                          anchors.verticalCenter: parent.verticalCenter
                          model : ["do", "I", "crash"]
                      }
                  }
              }
      
          }
      }

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            liaqi Liang Qi
            mschouwen Martin Schouwenburg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes