In my form I have a QListWidget which contains checkable QListWidgetItems. I’m looking for a way to capture the event of a QListWidgetItem being checked/unchecked. I don’t see any such signal existing for this but maybe I’m wrong. What I’m currently doing is using the QListWidget::itemClicked() signal and checking the checkState of the QListWidgetItem, but this isn’t what I want because this event happens any time the item is clicked, not just went the checkmark is toggled. Can anyone give some assistance? Thanks!
In my form I have a QListWidget which contains checkable QListWidgetItems . I’m looking
Share
Apparently no such signal is provided, your best bet is to use
QListWidget::itemChanged(QListWidgetItem* item), and scan the resultingitem->checkState(). This should be a slight improvement over usingitemClicked