Hi all,
I am using the below code to obtain filenames from the folder. Everything is working fine but I don't want to be taken back to the same folder every time I execute the code. Instead I want the program to remember what folder was last opened by the user and I want the program to offer that folder as the default. In other words, I want the current folder to change as the new folder is opened by the user. I know there is "setCurrent()" that I could perhaps use but I never got it working. Would anyone be able to help me with this code. Thanks a lot!
tr
("Open file"),
QDir::current().
dirName(),
tr("Image Files (*.jpg *.jpeg)"));
QString filenametext = QFileDialog::getOpenFileName(this,
tr("Open file"), QDir::current().dirName(),
tr("Image Files (*.jpg *.jpeg)"));
To copy to clipboard, switch view to plain text mode
Bookmarks