PDA

View Full Version : How to align list items to the center?



zgulser
9th February 2009, 08:08
Hi,

Is there any way to put the list items in the middle of the row that they exist?

Regards

spirit
9th February 2009, 08:23
see,
for widgets


void QListWidgetItem::setTextAlignment ( int alignment )
void QTableWidgetItem::setTextAlignment ( int alignment )
void QTreeWidgetItem::setTextAlignment ( int column, int alignment )

for standard item model


void QStandardItem::setTextAlignment ( Qt::Alignment alignment )

jpn
9th February 2009, 08:24
See QListWidgetItem::setTextAlignment().

PS. Please search the forums before asking questions. This question has been asked before.

zgulser
9th February 2009, 09:22
Hi,

Sorry about the rules. But, I actually want to ask is there a way to do it from the designer? Thanks.

jpn
9th February 2009, 09:52
But, I actually want to ask is there a way to do it from the designer?
In Qt Designer 4.5 there is.