Qt-interest Archive, August 2007
QTableView, default row height
Message 1 in thread
Hello,
the default row-height of QTableView is much larger than I would like.
How can I specify the row-height of *every* row, instead of using
setRowHeight(row,height);?
Using a loop for new rows is absolutely not possible, because I'm handling
up to 500.000 rows and I'm sure it'd cause a noticeable delay.
Regards,
Daniel Albuschat
--
[ signature omitted ]
Message 2 in thread
Daniel Albuschat wrote:
> Hello,
>
> the default row-height of QTableView is much larger than I would like.
> How can I specify the row-height of *every* row, instead of using
> setRowHeight(row,height);?
> Using a loop for new rows is absolutely not possible, because I'm handling
> up to 500.000 rows and I'm sure it'd cause a noticeable delay.
>
The row and column sizes are actually controlled by the headers. Even
QTableview::setRowHeight() just makes calls to
verticalHeader()->setSectionSize(). Check out
QHeaderView::setDefaultSectionSize()
http://doc.trolltech.com/4.3/qheaderview.html
--Justin
begin:vcard
begin:vcard
fn:Justin Noel
n:Noel;Justin
org:ICS;Engineering
adr:;;54B Middlesex Trpk;Bedford;MA;01730;USA
email;internet:justin@xxxxxxx
title:Sr. Consulting Engineer / Certified Qt Instructor
tel;work:(617) 621-0060
url:http://www.ics.com
version:2.1
end:vcard
Message 3 in thread
2007/8/13, Justin Noel <justin@xxxxxxx>:
> Daniel Albuschat wrote:
> > Hello,
> >
> > the default row-height of QTableView is much larger than I would like.
> > How can I specify the row-height of *every* row, instead of using
> > setRowHeight(row,height);?
> > Using a loop for new rows is absolutely not possible, because I'm handling
> > up to 500.000 rows and I'm sure it'd cause a noticeable delay.
> >
>
> The row and column sizes are actually controlled by the headers. Even
> QTableview::setRowHeight() just makes calls to
> verticalHeader()->setSectionSize(). Check out
> QHeaderView::setDefaultSectionSize()
Thanks, it works. Hidden like that, I wouldn't ever have found it
myself, I think. :-)
Regards,
Daniel Albuschat
--
[ signature omitted ]