Qt Code:
  1. QFileDialog l_pFiledDlg;
  2. QString sFilename1;
  3. l_pFiledDlg.setViewMode(QFileDialog::Detail);
  4. sFilename1 = l_pFiledDlg.getOpenFileName(this,tr("Open Files"), sPath, tr("All Files (*.*)"));
To copy to clipboard, switch view to plain text mode 

Using the above code the filedialog which opens is showing "list" as its view mode. It is not changing to "detail" view by default.

I think everything seems correct, but I do not know why it is not working?