Results 1 to 3 of 3

Thread: Difference between double click and Open button in QFileDialog

  1. #1
    Join Date
    Oct 2007
    Location
    Lake Forest, CA, USA
    Posts
    132
    Thanks
    10
    Thanked 27 Times in 22 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Question Difference between double click and Open button in QFileDialog

    Just got a very strange bug when use QFileDialog. If I open files using double click on filename, everything works just fine. But if I select file and then press Open, the first time file is opened correctly, but the second time program hangs. Combining double click and Open doesn't lead to hang. Only two sequential opening using Open causes program hang. Debugging doesn't show any differences between those open variants. Maybe something wrong with threads, but I can't understand what exactly.

    Any ideas are highly appreciated. Thanks.
    Oleg Shparber

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Difference between double click and Open button in QFileDialog

    That is odd.
    What version of Qt you're using?

    Could you post fragment of the code that handles the dialog?

  3. #3
    Join Date
    Oct 2007
    Location
    Lake Forest, CA, USA
    Posts
    132
    Thanks
    10
    Thanked 27 Times in 22 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: Difference between double click and Open button in QFileDialog

    Qt 4.7.4 for Windows (no such bug on Linux)

    The dialog code is quite simple:
    Qt Code:
    1. QString fileName = QFileDialog::getOpenFileName(this, tr("Open media file"), playerSettings2->prevFileDir, ::mediaDialogFilter);
    To copy to clipboard, switch view to plain text mode 

    But hang occurs later in other libVLC's thread, when it tries to start playback. So, I don't know even where to dig.
    Oleg Shparber

Similar Threads

  1. Replies: 0
    Last Post: 8th November 2011, 12:16
  2. Replies: 2
    Last Post: 11th May 2011, 00:03
  3. Replies: 2
    Last Post: 23rd December 2010, 09:53
  4. How to open any file on button click???
    By r3aktor in forum Newbie
    Replies: 5
    Last Post: 8th July 2009, 09:54
  5. Push button double click
    By curtisw in forum Qt Programming
    Replies: 3
    Last Post: 15th February 2006, 17:40

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.