title: How to know the file's type to save, using QFileDialog
body: <p>About pyQt4</p>
  
  <p>I prefer to use the static method for the getSaveFilename in the QFileDialog so that the user sees the Windows/Mac native dialog.</p>
  
  <p>My problem is that if the user doesn't type the file extension the in the save file name (say when selecting an image type to save a file as), then I don't have a way of checking to see what type of file they wanted to save as.</p>
  
  <p>How can I create a dialog to save files with a filter, and how to know which filter the user chose?</p>
  
  <p>For example:</p>
  
  <pre><code>files_types = "GML (*.gml);;Pickle (*.pickle);;YAML (*.yml)"
  file = QtGui.QFileDialog.getSaveFileName(self, 'Save file', '', files_types)
  </code></pre>
  
  <p>With var file I'll have only the file's path, but I'm not sure whats the format that user chose.</p>
  
  <p>So, I wanna know how could I get the extension, or the files type chosen by user.
  Is there away to get the selectedFilter using this method? </p>
  
  <p>Thanks a lot!</p>