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
16 July 2025
In the previous episode we discussed the foundation of proxy models; in this episode I'll show you two implementations of such proxy models.
Links:
* KDAB Migration Services: https://www.kdab.com/services/software-consulting/legacy-framework-migration/
Chapters:
00:00 Welcome
00:35 Short recap
01:05 Subclassing QIdentityProxyModel
02:21 AllUpperCaseProxyModel
04:40 Live coding: Changing background color depending on type of media
10:04 Why is the trick with custom roles, so important?
12:09 Sorting using QSortFilterProxyModel
12:47 Filtering using QSortFilterProxyModel
13:07 Subclasing QSortFilterProxyModel for sorting
14:01 Subclassing QSortFilterProxyModel for filtering
19:01 QAbstractProxyModel - links to QWAM
20:37 Advertise: Migrating from photon or MFC
20:52 The alternative to implementing QAbstractProxyModel
23:03 Signals + never give out someone else's indexes
24:47 Final words on proxy models
The example code showcased in this video is available here:
https://github.com/KDABLabs/kdabtv/tree/master/Programming-With-Qt-Widgets
All 'Introduction to Qt Widgets - Module 1' videos: https://www.youtube.com/playlist?list=PL6CJYn40gN6hgf7zCKF2Rv9Y0WoN8RVGf
All 'Introduction to Qt Widgets - Module 2' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6j_c41CFMprvg9EiWz0WdSy
All 'Introduction to Qt Widgets - Module 3' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6hWZO_viEf1rfjgk4E6SCKd
All 'Introduction to Qt Widgets - Module 4' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6iXUNQMb2GkEjV_oK6Xid9-
All 'Introduction to Qt Widgets - Module 5' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6h1tsLAETdrrFlsVMeYpiHI
All 'Introduction to Qt Widgets - Module 6' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6jIsRYriqN70V83t_mdDZHT
All 'Introduction to Qt Widgets - Module 7' videos: https://www.youtube.com/playlist?list=PL6CJYn40gN6hHyqD9ZxUqpd14LoHvadN7
All 'Introduction to Qt Widgets - Module 8' videos: https://www.youtube.com/playlist?list=PL6CJYn40gN6iCb8g5NSfVqX0JRFzFnxak
All 'Introduction to Qt Widgets - Module 9' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6hALniX7Fw_Ly29bg7pXBqC
Please note that non-English dubs for all KDAB videos are auto-generated. These translations have not been moderated by us and may contain inaccuracies. We appreciate your understanding and apologize for any confusion this may cause.