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

ResetModel leads to ReferenceError

    XMLWordPrintable

Details

    • Windows

    Description

      The basic idea of this bug is the follow. I like to load a new model from file. This is done via the Singleton  PlanStorageModel in c++. The function loadPlan in the following example calls calls beginResetModel and EndResetModel. That is all.

      Popup {
        id: popup
        closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
        width: 200
        height: 300
        ColumnLayout {
           Repeater {
              model: PlanStorageModel
              delegate: Button {
                 text: nameRole
                 onClicked:{ 
                    PlanStorageModel.loadPlan(nameRole)
                    popup.close() 
                 }
              }
           }
         }
      }
      
      

       

      After the load is finished, the popup should be closed. But this is not possible. I get the Error

      qrc:/Intervaltimer/qml/LoadPlanView.qml:22: ReferenceError: popup is not defined

      I think is is a bug, because there are no changes done in the UI. The popup still exists. When I switch the calls PlanStorageModel.loadPlan and popup.close() it works as expected

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            fettpet Sev Dw
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes