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

JS binding re-evaluation not working anymore

    XMLWordPrintable

Details

    • 1969991c4a4bd39ee224b0fa3c8cffa51f061757

    Description

      After the upgrade to qt 5.6 a js method bound to a qml object property is not re-evaluated anymore.
      This is the method code:

      function checkModifiedSettings()
          {
              if( typeof settingsList.model == "undefined" || settingsList.model == null )
              {
                  console.log("WARNING : checkModifiedSettings settingsList.model is not defined!");
                  return false;
              }
      
              for(var i=0;i<settingsList.model.count;i++)
                  if( settingsList.model.get(i).modified )
                      return true;
      
              return false;
          }
      

      "settingsList" is a ListView and the associated model is a "ListModel".

      This method is then bound to a property like this:

      enabled: checkModifiedSettings()
      

      When the "modified" property of some items of the model changes then the old behavior was the method re-evaluation. Since the update to qt 5.6 this doesn't work anymore.

      Attachments

        Issue Links

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

          Activity

            People

              shausman Simon Hausmann
              mralmond Gianluca Bergamo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes