PDA

View Full Version : Difference between double click and Open button in QFileDialog



Oleg
28th November 2011, 12:04
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.

Spitfire
28th November 2011, 15:59
That is odd.
What version of Qt you're using?

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

Oleg
28th November 2011, 16:12
Qt 4.7.4 for Windows (no such bug on Linux)

The dialog code is quite simple:


QString fileName = QFileDialog::getOpenFileName(this, tr("Open media file"), playerSettings2->prevFileDir, ::mediaDialogFilter);


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