[PyKDE] Unexplained delay calling Python method
Tony Cappellini
cappy2112 at gmail.com
Thu Mar 1 06:51:54 GMT 2007
I'm using Pyqt 4.2.2 on Win XP, SP2.
I've got a button which is connected to a method I've written.
Here is the connect line
QDialog.connect(self.ui.actionOpen, SIGNAL("triggered()"),
self.fileOpen)
here is the method it calls
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()
When I press the gui button, the FileOpen dialog takes almost 10
seconds before it appears.
I've tried running this in WigIDE, and set a breakpoint in FileOpen.
I see the same behavior. There is a unexplained long delay between the
time the button is clicked, and the time the breakpoint in FileOpen is
hit.
I just don't understand this.
More information about the PyQt
mailing list