[PyKDE] 'Could not read directory' QFileDialog.getSaveFileName(), Unix

Phil Thompson phil at river-bank.demon.co.uk
Sat Aug 25 13:54:23 BST 2001


Stephan Koerner wrote:
> 
> Hello,
> 
>   Am I doing something silly or is there a quick workaround to this issue.
> 
> Under UNIX (IRIX, HP-UX, SunOS, )
>   fn = QFileDialog.getSaveFileName("foo.txt", "Text files (*.txt)", self)
> 
>   Pumps an ERROR alert to the screen with the String
>     'Could not read the directory foo.txt/'
> 
> Under NT
>   This command does not present the user with the ERROR alert.
> 
> Regardless, after the ERROR alert the Dialog is in the proper (current)
> directory
> and the program supplied default file name 'foo.txt' is there.
> 
> To replicate this scenario modify line 236 of the 'application.py' example
> of the PyQt 2.4 distribution and supply a 'startWith' string as the first
> argument of QFileDialog.getSaveFileName()
> 
> Any thoughts on how to prevent the ERROR alert from being invoked would
> be appreciated.

I can't reproduce this with PyQt 2.5 and Qt 2.3.1. It's almost certainly
a Qt issue - what version are you using?

Phil




More information about the PyQt mailing list