set root directory for qFileDialog()
Unsolved
General and Desktop
-
hi buddies.
i am using qDialog to get user selected file path.
qFileDialog *fileDlg; fileName =fileDlg->getOpenFileName(this, tr("Please choose video file"), tr("/run/media/sda1/videos/"),tr("All files (*.mp4)"), 0, QFileDialog::DontUseNativeDialog);
but i need to restrict qfileDialog window to the directory which i set as root. it means that user should not be able to use "Back" button and access to parents directoies.
-
Hi,
I don't remember exactly but maybe using a proxy model might do the job can get you the result you want.