I have set up Qt GUI and it all works fine, except when it gets to this bit in my Python program:
newfilename
= QtGui.
QFileDialog.
getOpenFileName(self,
'message', filter
= '*.txt')self.statusBar().showMessage(self.tr('START'))
result = os.system ('sleep 10')
self.statusBar().showMessage(self.tr('END'))
newfilename = QtGui.QFileDialog.getOpenFileName(self, 'message', filter = '*.txt')
self.statusBar().showMessage(self.tr('START'))
result = os.system ('sleep 10')
self.statusBar().showMessage(self.tr('END'))
To copy to clipboard, switch view to plain text mode
I would expect to choose my file, click open, then the dialogue would disappear and I would see 'START' on the statusbar to reassure me that something good was happening. What happens is that the dialogue sticks with the 'Open' button down until 'sleep 10' has finished, so it looks like the program has hung up. Eventually the dialogue clears, the message 'START' appears momentarily, then 'END'. don't think the dialogue actually does anything to the file like opening or locking it, so it can't be that.
I can upload the whole (very short) test program and .ui file if anyone wants to try it.
Bookmarks