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?
dialogFile.setDefaultSuffix("xml");
QString filename
= dialogFile.
getSaveFileName(this,
QString::FromUtf8("Save file - XML distr."), tr
("test.xml"), tr
(".xml"));
QFileDialog dialogFile(this);
dialogFile.setDefaultSuffix("xml");
QString filename = dialogFile.getSaveFileName(this, QString::FromUtf8("Save file - XML distr."), tr("test.xml"), tr(".xml"));
To copy to clipboard, switch view to plain text mode
Thanks,
Marcelo E. Geyer
Bookmarks