What I did, was:
QString pdfFile
= QFileDialog::getSaveFileName(this, trUtf8
("Save Client Details:"),
"Client_"+fullName,
"Pdf Files (*.pdf)");
QString pdfFile = QFileDialog::getSaveFileName(this, trUtf8("Save Client Details:"), "Client_"+fullName, "Pdf Files (*.pdf)");
To copy to clipboard, switch view to plain text mode
And just use printer.setOutputFileName(pdfFile);
When You try to save file, Save File Dialog appears and it has default file name (in this case "Client+fullName") and if there is file with the same name it just ask if You want to overwrite it.
Bookmarks