I had a requirement where i have to select n number of .bin file for reading purpose.
So I implemented the code like below which is working fine
Qt Code:
  1. QDir directory("Documents");
  2. QString path = directory.filePath(" ");
  3. QStringList BinFileNames = QFileDialog::getOpenFileNames(this,tr("Open File"),path,tr(".bin"));
  4. BinFileSize = BinFileNames.size();
To copy to clipboard, switch view to plain text mode 
but now the requirement is like i have to select only the folder which contain all the .bin file.
So i tired to implement like below
Qt Code:
  1. QString Directory = QFileDialog::getExistingDirectory(this, tr("Choose Or Create Directory"),
  2. "/home",
  3. QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
To copy to clipboard, switch view to plain text mode 
but not getting how can i save all file path in a QStringList.
So in shot how can I get all the file form the selected folder and open for read purpose