qt - Latest selected directory as default directory in QFileDialog -
how can set latest selected directory default directory in qfiledialog?
you should store last selected directory in variable , use during next call of qfiledialog::
getopenfilename
:
qstring path = "/"; qstring filename = qfiledialog::getopenfilename(this, "open file", path); path = qfileinfo(filename).path(); // default directory directory previous call qstring anotherfilename = qfiledialog::getopenfilename(this, "open file", path);
Comments
Post a Comment