Add filter to entryInfoList
On Unix entryInfoList() does not list hidden files. You have to "ask" for them. I think it will be similiar on Mac.
QFileInfoList list = QDir::root().entryInfoList(QDir::AllEntries | QDir::System | QDir::Hidden);
for(int i=0; i<list.count(); i++){
cout<< list[i].fileName().toStdString()<<endl;
}