Hi,
I use a QListWidget to navigate in a QDialog (Configuration). How I can set the icon and text inside a item horizontal center?
I use for the QListwidget:
contentsWidget = new QListWidget;
contentsWidget->setViewMode(QListView::IconMode);
contentsWidget->setIconSize(QSize(48, 48));
contentsWidget->setMovement(QListView::Static);
contentsWidget->setMaximumWidth(128);
contentsWidget->setFlow(QListView::TopToBottom);
And with the item I use setTextAlignment(Qt::AlignHCenter);
But the icon and text is always shown at the left hand border. What is the trick to show them centered?
Ingo
↧