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

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -