Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. GtkDialog mapped without transient parent

GtkDialog mapped without transient parent

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 4.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jrarmstro
    wrote on 22 Aug 2019, 00:51 last edited by
    #1

    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!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 22 Aug 2019, 19:22 last edited by
      #2

      Hi and welcome to devnet,

      As an alternative, you can use the non-native version of the dialog.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      K 1 Reply Last reply 22 Aug 2019, 21:58
      0
      • S SGaist
        22 Aug 2019, 19:22

        Hi and welcome to devnet,

        As an alternative, you can use the non-native version of the dialog.

        K Offline
        K Offline
        Kent-Dorfman
        wrote on 22 Aug 2019, 21:58 last edited by
        #3

        @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.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          Kent-Dorfman
          wrote on 22 Aug 2019, 22:02 last edited by
          #4

          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.

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jrarmstro
            wrote on 24 Aug 2019, 15:51 last edited by
            #5

            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#getOpenFileName

            The relevant option is QFileDialog::DontUseNativeDialog, detailed here:
            https://doc.qt.io/qt-5/qfiledialog.html#Option-enum

            Passing this option solved the issue (and I'd say I like the non-native dialog better!)

            1 Reply Last reply
            1

            1/5

            22 Aug 2019, 00:51

            • Login

            • Login or register to search.
            1 out of 5
            • First post
              1/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved