How set default file to save in QFileDialog
Hi friends,
How do I set the name of a file in the window dialog QFileDialog? With this code below I can do this by putting the name "test.xml" as the file name, but this is correct? What is the best way?
Code:
dialogFile.setDefaultSuffix("xml");
QString filename
= dialogFile.
getSaveFileName(this,
QString::FromUtf8("Save file - XML distr."), tr
("test.xml"), tr
(".xml"));
Thanks,
Marcelo E. Geyer
Re: How set default file to save in QFileDialog
Try the way it is demonstrated in QFileDialog::getSaveFileName() docs.