[PyQt] Row Height of a QTreeView

Sven Grunewaldt strayer at olle-orks.org
Fri Jul 24 10:33:54 BST 2009


Hi,

I used this (C++) code to set a default height for all rows in a 
QTableView, I guess it will work with a QTreeView too:
schuleView->verticalHeader()->setDefaultSectionSize(fontMetrics().lineSpacing() 
+ 8);

Maybe this code snippet helps.

Regards,
Sven Grunewaldt

Am 24.07.2009 00:26, schrieb Albert Cervera i Areny:
> A Dijous, 23 de juliol de 2009, Fabrizio Milo aka misto va escriure:
>    
>> Hi,
>>
>> how can I set programmatically the height of the rows of a QTreeView?
>>      
> Row height depends on the sizeHint() of all the delegates in the row. So it
> depends on the font size (or if the text is wrapped, etc).
>    


More information about the PyQt mailing list