GtkDialog mapped without transient parent
-
wrote on 22 Aug 2019, 00:51 last edited by
Re: "GTK" warning for Native QFileDialog under Linux
Hi,
Is there still no fix/workaround for this? Terminal output is important to my program and I have searched for a way to disable/fix this warning to no avail. (See original post.)
Is there a different file picker available in Qt that I could use in lieu of
QFileDialog::getOpenFileName
to resolve this issue? I'm kind of new to Qt.Thanks!
-
Hi and welcome to devnet,
As an alternative, you can use the non-native version of the dialog.
-
Hi and welcome to devnet,
As an alternative, you can use the non-native version of the dialog.
wrote on 22 Aug 2019, 21:58 last edited by@sgaist said in GtkDialog mapped without transient parent:
As an alternative, you can use the non-native version of the dialog.
My thoughts exactly, but I couldn't quickly locate the docs for native vs non-native dialogs and didn't want to post a falsehood. Also, using a desktop manager that is not gtk based may alleviate this problem, as gnome/gtk has a well known history of doing things their own way with complete disregard for the rest of the world or the problems they may introduce.
-
wrote on 22 Aug 2019, 22:02 last edited by
BTW: if this problem is just a case of not wanting to see the warnings in an xterm then the OP can run the app in an xterm where stderr has been redirected to a file or /dev/null. That should make all qt program warning dissappear from the xterm session. Actually, if it were me I'd run xconsole and direct stderr to that window.
-
wrote on 24 Aug 2019, 15:51 last edited by
Hi all,
Thanks for the helpful responses. Here's the doc link for anyone else facing this issue:
https://doc.qt.io/qt-5/qfiledialog.html#getOpenFileNameThe relevant option is
QFileDialog::DontUseNativeDialog
, detailed here:
https://doc.qt.io/qt-5/qfiledialog.html#Option-enumPassing this option solved the issue (and I'd say I like the non-native dialog better!)
1/5