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
22 April 2021
A nice feature of QListView and QTreeView is that the user can adapt the width of the columns using the mouse. A problem with that, however, is what to do if the column width is not wide enough to show all text. In this episode we will present an adapter that allows your model to provide multiple different strings the view can choose from.
The example code showcased in this video is available here:
https://github.com/KDAB/kdabtv/tree/master/Qt-Widgets-and-more/ColumnHeaderLengthAdapter
All Qt Widgets and more videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI