Hi All,
Do you know how to align items in colums inside a QTreeWidget
in Qt 3, with QListView there was setColumnAlignment(int, int) ;
what is the corresponding feature in Qt 4.3 ?
Thanks,
David
Hi All,
Do you know how to align items in colums inside a QTreeWidget
in Qt 3, with QListView there was setColumnAlignment(int, int) ;
what is the corresponding feature in Qt 4.3 ?
Thanks,
David
You can do this by calling:
void QTreeWidgetItem::setTextAlignment ( int column, int alignment )
Good luck,
Tom
Ok, but when you got many items like (i.e: 10000) and I want to set column alignment only for 1 colum; it means I have to loop through all QTreeWidgetItem and to set the column alignment
it will consume lot of time ...
Not something else more lighter ....
Thanks
David
You could of course set the alignment while creating those items unless you want to adjust it at runtime. This is one of those limitations or problems you face with item based convenience views. With model based approach it would be fairly simple..
J-P Nurmi
Bookmarks