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

ScrollView crashes when ListView model is set to another model

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.9.0
    • Fix Version/s: 5.9.1
    • Component/s: Quick: Controls 2
    • Labels:
      None
    • Commits:
      db6f1440cbe78018e442c1fb961310a4e619e8fe

      Description

      I have a QStandardItemModel that has text and another QStandardItemModel, both have CPP ownership, besides I have code like: 

      ScrollView {
        ListView {
          model: devices
          delegate: ItemDelegate {
            text; roleText
            onClicked: connectionsView.model = roleModel
          }
        }
      }

      ScrollView {
        ListView {
          id: connectionsView
        }
      }

      The first click works fine, the second crashes the application, removing the surrounding ScrollView of connectionsView, it works as expected,

      The backtrace I got is not of much use, my app is a debug build but it seems Qt is not, I'm using precompiled Qt binaries on Linux.

        Attachments

        1. main.cpp
          2 kB
        2. main.qml
          0.7 kB
        3. qml.qrc
          0.1 kB
        4. qtquickcontrols2.conf
          0.3 kB
        5. scrolltest.pro
          1 kB
        For Gerrit Dashboard: QTBUG-61294
        # Subject Branch Project Status CR V

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dantti Daniel Nicoletti
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are 2 open Gerrit changes