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

[REG: 5.13->5.14] Bindings in delegates get triggered multiple times if delegate and/or model is changed

    XMLWordPrintable

Details

    • 2664b1988f (qt/qtdeclarative/dev) 2664b1988f (qt/tqtc-qtdeclarative/dev) 49e28a122b (qt/qtdeclarative/6.3) 49e28a122b (qt/tqtc-qtdeclarative/6.3) 49e28a122b (qt/tqtc-qtdeclarative/6.3.1) e4cd376599 (qt/tqtc-qtdeclarative/5.15)

    Description

      If model or delegate is changed, bindings in delegate are now triggering twice. If both are changed at once, bindings will trigger 3 times.

      This can cause big performance issues especially on embedded devices because this will also cause Text to emit size changes (even though it didn't change) every time.

      To reproduce, run attached example and click the toggle button to switch model and delegate. That causes binding for text in the new delegate to be evaluated 3 times (per item) and each time onTextChanged is triggered which prints a message. Additionally widthChanged is also triggered.

      In Qt 5.13 and older this didn't happen.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-102793
          # Subject Branch Project Status CR V

          Activity

            People

              fabiankosmale Fabian Kosmale
              poikelin Joni Poikelin
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes