Results 1 to 6 of 6

Thread: Python QtGui.QFileDialog.getOpenFileName hanging

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    ChrisOfBristol Guest

    Default Python QtGui.QFileDialog.getOpenFileName hanging

    I have set up Qt GUI and it all works fine, except when it gets to this bit in my Python program:

    Qt Code:
    1. newfilename = QtGui.QFileDialog.getOpenFileName(self, 'message', filter = '*.txt')
    2. self.statusBar().showMessage(self.tr('START'))
    3. result = os.system ('sleep 10')
    4. 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.
    Last edited by ChrisOfBristol; 17th February 2015 at 17:45.

Similar Threads

  1. QFileDialog::getOpenFileName in DLL
    By OverTheOCean in forum Qt Programming
    Replies: 1
    Last Post: 22nd February 2011, 10:31
  2. Why QFileDialog::getOpenFileName is not centered?
    By ricardo in forum Qt Programming
    Replies: 20
    Last Post: 31st August 2009, 00:08
  3. Replies: 2
    Last Post: 10th January 2008, 13:52
  4. Problem with QFileDialog::getOpenFileName()
    By spud in forum Qt Programming
    Replies: 4
    Last Post: 1st November 2007, 23:31
  5. Replies: 1
    Last Post: 15th October 2007, 00:10

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.