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# - ajax - How to receive data both html and json from server? -

c# - SharpDX Toolkit models rendering inside out -