View Full Version : setColumnAlignment QTreeWidget
desch
25th October 2007, 12:00
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
DeepDiver
25th October 2007, 12:23
You can do this by calling:
void QTreeWidgetItem::setTextAlignment ( int column, int alignment )
Good luck,
Tom
desch
25th October 2007, 13:18
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 ... :rolleyes:
Not something else more lighter .... :o
Thanks
David
jpn
25th October 2007, 13:27
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.. ;)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.