0
QFileSystemModel* _dirModel = new QFileSystemModel(this);
.
.

_dirModel->rmdir(index);

_dirModel->remove(index);

"rmdir" seems to be made for removing directories, but I succesfully deleted directory with "remove" as well. What's the point of having "rmdir" while "remove" can do the same job?

iamalminko
  • 105
  • 8

1 Answers1

0

From documentation :

  • QFileSystemModel::remove deletes the given file from the file system
  • QFileSystemModel::rmdir deletes the given directory from the file system.
ymoreau
  • 3,402
  • 1
  • 22
  • 60