Hello!

I'm trying to remove one of few listed files from model of QListView. I'm using this code but it doesn't work:
Qt Code:
  1. ui->listView->model()->removeRow(ui->viewFiles->currentIndex().row());
To copy to clipboard, switch view to plain text mode 
Same thing is if I use model->removeRow(..same as above..);

What's wrong with this code and how to delete item from list?

Thank you!