Hi ,
I using filesystem model in my program to display the filesystems....
Its working fine, it displays all the files and directoris including Dot and DotDot....
But i dont want to display the "DotDot" hence i used filter as shown below, unfortunately its not working....IT DISPLAYS DOTDOT ALSO....
Please somebody tell me whats wrong here...

Qt Code:
  1. QString sPath=ui->lineEdit_directory->text();
  2. dirmodel =new QFileSystemModel(this);
  3. dirmodel->setFilter(QDir::AllDirs | QDir::Dirs |QDir::NoDotDot); <---HERE "QDir::NoDotDot" IS NOT WORKING
  4.  
  5.  
  6. dirmodel->setRootPath(sPath);
  7. ui->treeView->setModel(dirmodel);
  8. ui->treeView->setRootIndex(dirmodel->index(sPath));
To copy to clipboard, switch view to plain text mode