[PyKDE] Unexplained delay calling Python method- partial explanation

Hans-Peter Jansen hpj at urpla.net
Thu Mar 1 15:04:24 GMT 2007


Am Donnerstag, 1. März 2007 08:13 schrieb Tony Cappellini:
> When I set the breakpoint in the debugger, I had inadvertently set it
> on this line
>       FileDialog = QFileDialog()
>
> I really wanted to set the breakpoint on
> the getOpenFileNames() call.
>
> However, I've FOUND the source of the unexplained delay,
> it's the call to QFileDialog()/.
>
> Why does this call take more than 10 seconds??
>
> I"m guessing it's a Windows-specific issue.
> Have any other windows users seen this problem?
>
>
>   def fileOpen(self):
>       '''
>       Displays the file open dialogue, allows the user to select patches
>       to be converted.
>       '''
>       FileDialog = QFileDialog()
>       FileDialog.setFilters(['*.pch', '*.*'])
>       msg = QApplication.translate("MainWindow", "Select patch files
> To Convert",  None, QApplication.UnicodeUTF8 )
>       #self.ui._TargetFilesToConvert =
> QFileDialog.getOpenFileNames(None, msg , os.getcwd(), '*.pch *.*')
>       self._TargetFilesToConvert =
> list(FileDialog.getOpenFileNames(None, msg , os.getcwd()))
>       if self._TargetFilesToConvert:
>           self._DisplayFilesToConvert()

This sounds, like you have some invalid/misbehaving devices installed, e.g. 
floppy A: activated in BIOS, but no drive and the like..., although I'm not 
a Windows user (just suffering from it's usual admin tasks from time to 
time..). 

Pete




More information about the PyQt mailing list