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

ListView asserts when a null model is assigned from a QObject derivative typed property.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 5.2.0 Beta1
    • None
    • f0d2857271a2e619d6ede54a6855326e9232fd12 (qtdeclarative)

    Description

      The snippet below will assert in QQmlAdaptorModel::setModel because it assumes a QVariant of a QObject derived type cannot be null.

      Changing the type of the model property from ListModel prevents the crash.

      Item {
          id: root
      
          width: 100
          height: 100
      
          property ListModel model
      
          ListView {
              model: root.model
          }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              andrew.den.exter Andrew den Exter
              andrew.den.exter Andrew den Exter
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes