Please add :

filemodel ->setFilter( QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot );

I tried and worked !