Tools for making improved models with Qt

December 1, 2019

TALK: Model Models - Tools for Making Better Behaved Models SPEAKER: André Somers COMPANY: KDAB TRACK: Tooling & Testing Talk recorded at the Qt World Summit 2019 event in Berlin. #QtWS19 November 2019 - BCC TALK DESCRIPTION: Qt QAbstractItemModel API is used for both widgets and QML applications where it plays a central role for cases where there is a need to present larger quantities of data. For optimal performance, UI experience and to be able to use the insert, remove, move and displaced transitions on the QML ListView it is imperative that updates are signaled properly and as finely-grained as possible. But how do we deal with back-ends that don’t deliver enough data to do this? What if they just signal ‘changed’ or give us a whole new list without indicating what changed? Instead of relying on repetitive, hard-to-read and error-prone code or in the worst case relying on a model reset, I will present a generic approach leading to a simple drop-in solution to deal with data that comes in in bulk which results in proper, finely-grained updates to the model. A similar problem is providing all needed signals in case the model needs to be sorted. While a QSortFilterProxyModel does a good job doing the actual sorting, it does not provide the required signals to allow animating items moving in a QML ListView when the value of items changes or when the sort role or -column changes. In order to fix this, I will present a specialized proxy model that does enable this. Using these tools will help you make your models behave like “model” models. Qt WEBSITE: For more info Qt, visit our site https://qt.io RESOURCES: For more videos from Qt visit our resource centre; https://resources.qt.io FOLLOW US ON SOCIAL: FB: https://www.facebook.com/qt/ LI: https://www.linkedin.com/company/4788... TW: https://twitter.com/qtproject THE Qt COMPANY Design - Develop - Deploy

Previous Video
Rust binding for Qt : How to mix QML with Rust
Rust binding for Qt : How to mix QML with Rust

TALK: Rust Binding for Qt - QML SPEAKER: Olivier Goffart COMPANY: HicknHack Software TRACK: Qt & Technical...

Next Video
Can you use Qt without moc?
Can you use Qt without moc?

TALK: Verdigris Using Qt Without moc SPEAKER: Olivier Goffart COMPANY: Woboq TRACK: Qt & Technical Deep ...