I want to align the text items in the listwidget to center of the widget.Is that possible without using QlistWidgetItem/Delegates.I am adding all the items from a QList into the QListWidget using addItems() method.Any other options???
I want to align the text items in the listwidget to center of the widget.Is that possible without using QlistWidgetItem/Delegates.I am adding all the items from a QList into the QListWidget using addItems() method.Any other options???
It's very simple to do with a delegate. I don't know any other sensible way to do this.
J-P Nurmi
it's also pretty simple without a delegate:
Qt Code:
newItem->setTextAlignment(Qt::AlignCenter);To copy to clipboard, switch view to plain text mode
Bookmarks