Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up


Find what you need - explore our website and developer resources
15 June 2022
In the previous episode, we implemented a proxy model for reversing rows but left out one last signal to react to, namely layoutAboutToBeChanged.
Reacting to that signal is rather difficult, which is why we have dedicated a complete episode for that.
It will, among other things, take us through a discussion on persistent model indexes.
0:00 Introduction
1:11 Understanding QModelIndex
2:57 Updating the persistent model indexes
3:46 signal layoutAboutToBeChanged
5:58 signal layoutChanged
8:00 Why not for rowsInserted, etc.
9:50 Let me show you where persistent indexes get updated for rowsInserted
The example code showcased in this video is available here: https://github.com/KDAB/kdabtv/tree/master/Qt-Widgets-and-more/ReverseRowsProxyModel
All QML tips and tricks videos : https://www.youtube.com/playlist?list=PL6CJYn40gN6jWHP5krsQrVGyYtKh3A3be
All Qt Widgets and more videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI