Open file dialog box hangs on Fedora 35
Any operation that uses a file open dialog box will hang when the dialog box is closed. It doesn't matter whether a file is chosen, or the user cancels. For example, the "Import Wellue/Viatom data" menu option prompts for a file, then the dialog box disappears when one is (or is not) selected. However, the whole application is then unresponsive. None of the menus work, not even the close button on the window frame.
Debugging shows that the QDialog::exec()
is still running it event loop -- so the dialog has not really gone away, it just no longer has a window.
Changing my desktop to use Xorg instead of Wayland did not fix this problem (although it fixed some other niggles)
What did fix it was to ensure that this line gets compiled:
w.setOption(QFileDialog:Big GrinontUseNativeDialog, true);
around line 2924 in mainwindow.cpp
.
It's already compiled in for Windows, it seems. Looks like it needs to be called for Fedora as well.
I note that with the normal configuration, the file open dialog box is not properly anchored to the parent window, and sometimes appears behind it. With the non-native dialog box, it is always properly anchored.
I think this is a bug either in Qt or Gnome. For my part, I would be perfectly happy to see the Qt open file dialog rather than the Gnome one.
For the record:
$ uname -a Linux fedora 5.14.10-300.fc35.x86_64 #1 (closed) SMP Thu Oct 7 20:48:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/fedora-release Fedora release 35 (Thirty Five)
$ rpm -q -a |grep qt5-qtbase qt5-qtbase-5.15.2-30.fc35.x86_64