I’ve created a model which displays list of checkable strings in a listView. I don’t know how to check if those strings shown in listView are checked || not. Anyone have any idea how to go about it?
EDIT:
class File_List_Model : public QAbstractListModel
{
Q_OBJECT
private:
QStringList files_;//here I'm storing files selected by user
};
and in my dialog class called Line_Counter I have a fnc:
void Line_Counter::add_files()
{
QStringList selected_files = QFileDialog::getOpenFileNames();//here I'm getting those files
if (selected_files.size())
{
model_->setData(QModelIndex(),selected_files);//here I'm adding them to my model
}
}
connect(pointerToYourItem, SIGNAL(toggled(bool)), pointerToYourWindow, SLOT(somefunc(bool)));