1. I'm trying to remove one of a few listed files from a QListView model. I'm using this code but it doesn't work:
ui->listView->model()->removeRow(ui->viewFiles->currentIndex().row());
Same thing is if I use:
model->removeRow(ui->viewFiles->currentIndex().row());
What's wrong with this code, and how do I delete an item from the list?
2.
QFileSystemModel
loads only files from the selected directory. How do I count all those items from QListView
's model?