How to configure listview in Qt

I want to configure listview in Qt, can someone provide me an example or tips on how to do this? I am new to Qt.

+5
source share
3 answers

You can apply a stylesheet to yours QListView.

Check here for Qt documentation on customization QListViewusing style sheets.

+4
source

QListWidget ( , QStandardItem), setData.

, :

QListWidgetItem *colorItem = new QListWidgetItem("Red");
colorItem->setData(QBrush(QColor(Qt::red)), Qt::ForegroundRole);

list.addItem(colorItem);

.: http://ynonperek.com/qt-mvc-customize-items

+2
source

All Articles