estanisgeyer
29th January 2009, 11:44
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?
QFileDialog dialogFile(this);
dialogFile.setDefaultSuffix("xml");
QString filename = dialogFile.getSaveFileName(this, QString::FromUtf8("Save file - XML distr."), tr("test.xml"), tr(".xml"));
Thanks,
Marcelo E. Geyer
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?
QFileDialog dialogFile(this);
dialogFile.setDefaultSuffix("xml");
QString filename = dialogFile.getSaveFileName(this, QString::FromUtf8("Save file - XML distr."), tr("test.xml"), tr(".xml"));
Thanks,
Marcelo E. Geyer