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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Duplicate
    • Affects Version/s: 5.15.0
    • Fix Version/s: None
    • Component/s: Quick: Controls 2
    • Labels:
      None
    • Platform/s:
      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

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

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes