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

ComboBox.qml:56: TypeError: Cannot read property 'width' of null

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.15.0
    • Quick: Controls 2
    • None
    • Windows

    Description

      When scrolling ComboBox with large number of elements I see this warning in console.

      file:///C:/Qt/5.15.0/msvc2019_64/qml/QtQuick/Controls.2/ComboBox.qml:56: TypeError: Cannot read property 'width' of null

      I was able to "fix" it by changing line 56 from

      width: parent.width

      to

      width: parent ? parent.width : 100

       

      Minimal reproducible example is attached. It is just ComboBox with big model.

      P.S. probably QTBUG-81976 is related

      Attachments

        1. combobx-bug-mre.pro
          0.1 kB
        2. main.cpp
          0.6 kB
        3. main.qml
          4 kB
        4. qml.qrc
          0.1 kB

        Issue Links

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              asc7uni Mikhail
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: