I used below syntax in Qt5 according to new connect syntax to avoid type mismatches of slot and signals for a a QListWidget
with checkable items.
connect(item, &QListWidget::itemChanged,this , &mainWindow::checkItemChanged);
I want to run my slot in case any of list item changed its state. In order to this this I used itemChanged
signal due to this answer, but it is protected and compile time error raise as below:
error: ‘void QListWidget::itemChanged(QListWidgetItem*)’ is protected
How can I handles this? Should I subclass my own QListWidget
or there are some other solutions to this?