PDA

View Full Version : Qt 4.2: QListWidget changes size of its items



KingFish
23rd October 2006, 10:03
Hi,
with the migration from Qt 4.1.4 to Qt 4.2 my QListWidget changes the size of its items. I attached a sample screenshot from the dialog in which that happens. It’s the initial filling of the QListWidget. When items get updated with new data it sometimes happens that they resize from the original (small) size to the bigger one. I checked that no “\n” gets attached to the text()-QString. Any ideas?
Btw, using VC++ 2005 with stock 4.2.0 Desktop here.
Best regards.

jpn
23rd October 2006, 10:22
Isn't that a QTreeWidget? Are you setting any size hints for the items? This is just an idea, but try setting QTreeView's uniform row heights property to true.

KingFish
25th October 2006, 12:06
Yea, setting setUniformRowHeights(true) fixed the display in Qt 4.2.0.
And of course you're right, it's a QTreeWidget.