QFileDialog::getOpenFileName and the last used directory?
The title says it all really.. How can I make QFileDialog::getOpenFileName use the last used directory to start? When I want to open several files in the same directory in a row, it means navigating to the directory every time.. Which is a bit slow and awkward :-P
regards,
ko9
Re: QFileDialog::getOpenFileName and the last used directory?
It's the third parameter of QFileDialog::getOpenFileName():
Code:
if (!fileName.isNull())
{
...
path = QFileInfo(fileName
).
path();
// store path for next time }
PS. 'path' may also include file name if you want to. See QFileDialog::getOpenFileName() docs for more details.