AUG
11
2004

Qt 4 - "Interview"

Ok, so Qt 4's listview / table / iconview / listbox replacement is called "Interview" collectively. I started playing around with it last weekend and well, there's some good and some bad. The good is that at least from an initial take on things the performance seems much better. This could just be the double buffering tricking me and making it look smooth since I haven't actually done any really intensive tests on it, but it certainly feels more responsive.

On the other hand, wow -- it's pretty hard-core over-designed. Even for me -- and note that I've done most of the KListView maintenance for the last year or two -- it was really difficult to get a handle on things. I spent about two hours just to produce this which still doesn't work properly. It requires reimplementing an abstract base class, implementing 5 pure virtual methods, and coming up with some sort of content mapping scheme. I still haven't figured out list headers, full row selection -- not to mention adding feature like we have now with row highlighting and searching.

The API seems pretty powerful, but it's going to alienate a lot of the "show these ten items in a list" guys. Also it seems like a pretty poor decision to have reused the class name QListView, when in fact a QListView is just a view type that seems to roughly correspond to an iconview currently. There are no columns, column headers, etc. It would have been better to just not have a class by that name. I blindly assumed that it worked something like a listview does currently.

Anyway -- I'll pull together a semi-cohesive rant -- once I've got a bit more figured out -- and send it to the Qt 4 feeback list. Failing that I'll just corner one of the Trolls at aKademy and see if I can talk some sense into them. ;-)

Comments

That sounds positively horrid. I hope the Trolls don't go down the 'Java' object-oriented route and over-engineer everything, as you need to be able to build this stuff relatively easily without stacks of inheritance etc. Please talk some sense into them.


By segedunum at Thu, 08/12/2004 - 21:29

There's are some rant at Conectiva labs about the similar thing on GTK, and some dificulties and benefits around.
Interview comes from both Good and Evil, but i really think that isn't so bad as looks like. ( hope so )


By Helio Chissini de Castro at Fri, 08/13/2004 - 00:54

From the qt4-preview mailinglist:

"The plan has always been to have a set of "convenience" views
that work the same way as the old item views (more specifically
QHeaderWidget, QListWidget, QTableWidget and QTreeWidget).
The view classes that were part of the tech. preview are designed to be used by intermediate-to-advanced users that need the flexibility and speed of these classes.
If you just want to show a few items in a tree view, then QTreeWidget will be your friend! ;-)"

Using a model to populate a list is very effective though.
The way it works now in QT3 is, in my opinion, horrible.

On my pc, a PII 233 MHz, it takes about a second to add 1000 items to a listview. For 10000 items, this soon becomes more than 10 seconds.

I tried the list/treeview in QT4, and added 1,000,000 items to it.
It took less than a second.

That's a huge improvement, although, on fast computers, I think you wouldn't notice.


By Tim Beaulen at Fri, 08/13/2004 - 23:10

That's pretty good, and I think you would notice a difference on fast computers as you'd be surprised what gets lumped into listboxes in a lot of systems - I'm not really talking about KDE here. There are a lot of things that combine these days to slow a P4 down to a crawl, especially in corporate environments. Anything like this makes quite a big difference, and what's better is that it is fairly obvious what is fast and what isn't!


By segedunum at Sat, 08/14/2004 - 10:40