PDA

View Full Version : QListWidget with check box's



steg90
14th May 2007, 14:20
Hi,

Is it possible to have check box's in a QListWidget?

Thanks,
Steve

jpn
14th May 2007, 14:36
Yes:

QListWidgetItem* item = new QListWidgetItem("item", listWidget);
item->setFlags(item->flags() | Qt::ItemIsUserCheckable); // set checkable flag
item->setCheckState(Qt::Unchecked); // AND initialize check state

steg90
14th May 2007, 14:40
Many thanks JPN ;)