pkj
29th January 2013, 04:22
The static function of QFileDialog::getOpenFileName() QFileDialog#getOpenFileName defines a dir path for the current working directory. For the usage as:
QString filename = QFileDialog::getOpenFileName(0, tr("open file"), dirpath);
it sets the working directory as expected. However, the next time I open the dialog, the current working directory is set to last path where I picked the file from! In other words, history is being set in QFileDialog. I want to open the file dialog from the working directory I have specified, and not bother with the history. Is there a way I can do it, while keep using the convinience static function?
I can use QFileDialog as a conventional dialog function and not use the convinience function and overcome the issue, but given that there seems no way I can have native dialogs with QFileDialog, I wish to avoid its usage via the conventional dialog way.
QString filename = QFileDialog::getOpenFileName(0, tr("open file"), dirpath);
it sets the working directory as expected. However, the next time I open the dialog, the current working directory is set to last path where I picked the file from! In other words, history is being set in QFileDialog. I want to open the file dialog from the working directory I have specified, and not bother with the history. Is there a way I can do it, while keep using the convinience static function?
I can use QFileDialog as a conventional dialog function and not use the convinience function and overcome the issue, but given that there seems no way I can have native dialogs with QFileDialog, I wish to avoid its usage via the conventional dialog way.