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
4 March 2026
QRangeModel was introduced in Qt 6.10. Finally, we do no longer need to subclass to be able to provide data to a view - or do we?
In this episode, Jesper will show how to work with this new class, and discuss when it is a good idea to use, and when it is less so.
Chapters:
00:00 Welcome.
00:15 The very simplest case with a QListModel
00:49 The clasical way of implementing a table model
02:21 Table models using QRangeModel
03:40 Providing header data using QRangeModel
04:36 Providing row data from a struct you cannot modify
07:07 Simplyfying the access via QGadget
08:02 Editable models
12:58 Specifying different roles
14:04 Trees
16:30 Trees with a gadget
Links:
- QWAM Episode on structured bindings: https://youtu.be/f7dlD10bhiI?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI
- All Qt Widgets and More episodes: https://www.youtube.com/playlist?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI
Code:
The example code showcased in this video is available here: https://github.com/KDABLabs/kdabtv/tree/master/Qt-Widgets-and-more/RangeModel
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Upgrade your applications from Qt 5 to Qt 6 with KDAB’s migration services. Get a free migration assessment and join a hands-on workshop to prepare your team for a successful transition!
Learn more