Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
5.14.0
-
None
-
Win 10, mingw-32
Description
In QListWidget, when flag ItemIsUserCheckable is set, a checkbox should appear next to the item. This doesn't happen until the checkState property is set, either checked or unchecked.
for(int i = 0; i < widget->count(); ++i) { QListWidgetItem *item = widget->item(i); item->setFlags(item->flags() | Qt::ItemIsUserCheckable); item->setCheckState(Qt::Unchecked); //without this line, checkboxes are not shown }