Qt-interest Archive, October 2006
AW: QTableView set fixed row height [qt 4.1.4]
Message 1 in thread
More details:
After initially calling the "setRootIndex" method, I use "verticalHeader()->count()" to retrieve the number of rows to be displayed. Somehow, the call always returns 0, therefore I can't set the rows' (e.g. 5 in my example) height.
Does anybody have an idea where I could place my "setRowsHeight" call so that the rows are already there?
After some operations (creating, deleting) the rows' height is automatically reset to the text's height, which I'd like to avoid. It looks like Qt calls "resizeRowsToContents" sometimes just before the larger picture can be painted.
Thanks,
r.
-----Ursprüngliche Nachricht-----
QTableView set fixed row height [qt 4.1.4]
Hi,
I've got a QTableView displaying images (delegate in play) as well as other textual data and like to set the rows' height to a fixed size (128 px). For some strange reason, the row's height is automatically reset to the text's height (16px) instead of the manually set one in some cases.
I've tried to use the delegate's size hint to do it, without success.
Is there any method I've got to override?
Sincerely,
r.
--------------------------------------------------------------------
Rene Kaiser
Institute of Information Systems & Information Management
JOANNEUM RESEARCH Forschungsgesellschaft mbH
Steyrergasse 17, A-8010 Graz, AUSTRIA
phone: +43-316-876-1173 fax: +43-316-876-1191
web: http://www.joanneum.at/iis
e-mail: mailto:rene.kaiser@xxxxxxxxxxx
--------------------------------------------------------------------
--
[ signature omitted ]