Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

QListWidget - Center icon

$
0
0
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

Viewing all articles
Browse latest Browse all 18427

Trending Articles