Nominate our 2022 Qt Champions!

Model / View update efficiency in QML?

  • I am noticing something odd - making changes to a C++ model takes as much time to update the UI representation of the model as entirely resetting the model.

    This leads me to assume model / view updating is not really optimized and does all the work every time there is a change instead of just track and update the changes only.

    Can perhaps someone shed some light on the subject?

  • Lifetime Qt Champion


    Part of it depends on how you send the information about what you have changed. I've typically saw code where rather that calculating the right dataChanged range some developer where sending the whole model so in such cases there's indeed an impact.

Log in to reply