Uploaded image for project: 'Qt Extensions'
  1. Qt Extensions
  2. QTEXT-7

TreeView: crash (as opposed to only runtime warning) if keyword "required" is not satisfied

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5
    • Fix Version/s: None
    • Component/s: TreeView

      Description

      If a loader is given a source component TreeView which has a required property without a value instead of just giving a warning and the whole app will crash. Won't happen with TableView.

      Steps to reproduce the problem:

      1. Build and run the attached example

      Update: The following (simplified) snippet will also cause a crash

      import QtQuick.Window
      import QtQuick.TreeView
      import Qt.labs.qmlmodels
      
      Window {
          width: 800
          height: 600
          visible: true
      
          Loader {
              anchors.fill: parent
              sourceComponent: TreeView {
                  required property int testProperty
                  delegate: DelegateChooser {
                      DelegateChoice {
                          Rectangle {
                              implicitWidth: 100
                              implicitHeight: 30
                          }
                      }
                  }
              }
          }
      } 

        Attachments

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

          Activity

            People

            Assignee:
            fabiankosmale Fabian Kosmale
            Reporter:
            miikapernu Miika Pernu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes