Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 8

Qt-interest Archive, March 2002
Win32 3.0.2 QFileDialog::getSaveFileName() appending filter to filename???


Message 1 in thread

I have a strange problem where when I use the static
QFileDialog::getSaveFileName() as follows:

    QString saveFileName = QFileDialog::getSaveFileName(  );

saveFileName has the filter "All files (*.*)" appended to the filename.
This is with Qt 3.0.2 on Win32 - I do not have this problem with the same
code (Qt 3.0.2 as well) on Linux.

If I use a different overloaded static method, like this:

    QString saveFileName = QFileDialog::getSaveFileName( "",
                                              "Selections (*.sel)",
                                              this,
                                              "save file dialog"
                                              "Save file as..." );

I don't have this problem.

Anybody else run into this?  A quick browse through qt-interest archives
didn't turn anything up.  Am I just missing something here?  Incidentally,
I have a similar problem with getOpenFileName, but only when I hit <return>
to open the file, but if I hit the "Open" button or double-click on a file,
it works fine...  Any ideas?

Thanks!

-Hollister