[Interest] QFileDialog.getOpenFileName does not show any file

Yifei Li yifli82 at gmail.com
Fri Feb 10 03:37:47 CET 2012


Hi,

First of all, I use PyQt4 and my development machine is running MacOS Lion

Here is how the problem happens:

1) Inside a slot of my main window class, open a file using
QFileDialog.getOpenFileName for the first time.  I Also manually set the
focus on main window so that it handle keyPressEvent.

MainWindow:

def mySlot(self):
      filename = QFileDialog.getOpenFileName(...)
      self.activateWindow()
      self.setFocus()

2) the second time I try to open a file, the file dialog does not show any
file. Instead, the dialog seems to be in a busy-wating state (see the
attachment)

Has anyone had this problem before?

Regards,

Yifei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120209/605f6c82/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fileDialog.png
Type: image/png
Size: 50547 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120209/605f6c82/attachment.png>


More information about the Interest mailing list