[PyQt] QFIleDialog.getSaveFileName get the selectedFilter
Detlev Offenbach
detlev at die-offenbachs.de
Wed Mar 11 18:31:07 GMT 2009
On Dienstag, 10. März 2009, Phil Thompson wrote:
> On Tue, 10 Mar 2009 15:39:41 -0400, Darryl Wallace
>
> <darryl.wallace at prosensus.ca> wrote:
> > I prefer to use the static method for the getSaveFilename in the
> > QFileDialog so that the user sees the Windows/Mac native dialog.
> >
> > 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.
> >
> > Is there away to get the selectedFilter using this method?
>
> If you pass a QString as the selectedFilter argument it will be updated on
> return - not very Pythonic I know.
And it shouldn't be changed because that would break quite some code. ;-)
Detlev
--
Detlev Offenbach
detlev at die-offenbachs.de
More information about the PyQt
mailing list