title: QFileDialog: adding extension automatically when saving file?
body: <p>When using a <code>QFileDialog</code> to save a file and to specify the extension (like *.pdf) and the user types in a name without this extension, also the saved file hasn't this extension.<br>
  Example-Code:</p>
  
  <pre><code>QFileDialog fileDialog(this, "Choose file to save");
  fileDialog.setNameFilter("PDF-Files (*.pdf)");
  fileDialog.exec();
  QFile pdfFile(fileDialog.selectedFiles().first());
  </code></pre>
  
  <p>now when the user enters "foo" as the name, the file will be saved as "foo", not as "foo.pdf". So the <code>QFileDialog</code> doesn't add the extension automatically. My question: How can I change this?</p>