PDA

View Full Version : QAbstractItemView - Show all contents all the time...



youkai
28th August 2008, 15:22
Hi! :)

How to tell a QListWidget (QAbstractItemView) to never show any scrollbars and display all content all the time.

Because it is part of an extra QScrollArea, I do not need the scrolling in the QListWidget.

Any ideas?

Greetings

wysota
28th August 2008, 16:06
Set the vertical size policy to expanding and turn off the scrollbars using by setting their policy to AlwaysOff.

youkai
29th August 2008, 23:55
Well, does not work. :(

If I modify the "minimumHeight" at item-inserting it seems to work best ... but not perfect for all item views:

http://img514.imageshack.us/img514/5492/umanerroraawsjh9.png

Greetings

wysota
30th August 2008, 14:31
Get rid of all the nested views and place a single QTreeView and apply a custom delegate to it that will paint your items accordingly.

youkai
31st August 2008, 01:30
Well, I think it's a custom view - not a delegate - that I need :) Hmm....

wysota
31st August 2008, 17:54
No, it's a custom delegate you need. From the picture you have shown us it is obvious that I'm looking at a "would be" tree view. The only thing that might be reimplemented from it is the item layout mechanism (so that they flow from left to right).