I have finally and successfully converted a 'difficult' Qt3 multi column list to a QT4 QTreeView.
After:
- Successfully converted all the functionality of a multi column list view, included a column containing a graph, and one with a custom pixmap added to remaining normal text and with background color content dependent.
- Successfully obtained a very good loading speed, better then the super optimized and already fast Qt3 version.
- Successfully used a custom model and a custom delegate to come up with the particular data to be displayed and the custom way to do it.
I can finally say that the new QTreeView with his fellows QAbstractItemModel and QAbstractItemDelegate are... A PAIN IN THE ASS!
My humble advice is 'do not use' unless you really need. You'll be asked to add tons of cruft to make the toy start working and, at the end, you'll get something that has the same functions of the old one but with three times the code.
FWIK you get a real advantage ONLY if your application shows the same data in many different widget, and with different I mean different classes, not different objects.
I really don't understand why Qt designers choose that over engineered, academic approach.
Sorry for the rant, but I really like Qt and his API, this is the first time I hit the wall using it.
Marco
Bookmarks