Details
-
Bug
-
Resolution: Cannot Reproduce
-
Not Evaluated
-
None
-
5.2.1
-
None
-
Ubuntu 14.04, Qt5.2.1 (as distributed), PyQt5.2.1, Python 2.7 or 3.4 (doesn't make a difference.)
Description
User types ‘foo’ into a QFileDialog for choosing a Save file name, and clicks the OK button. App receives fileSelected signal twice, once with filename param “foo” and second with param “foo.txt”. Qt should only send signal once with foo.txt. (dialog.setDefaultSuffix(“txt”) was called on the dialog.)
In my experience, this is new behaviour. On earlier Ubuntu 13.04 and Qt4.8 I don't remember this (although it might be that I just didn't see it.)
A workaround is to just use the dialog's accepted signal, and query the filename via QFileDialog.filesSelected() (a getter, not a signal) which only returns 'foo.txt'.
Small demo program in PyQt attached, which prints to the console when signal is received (twice.)