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
Qt 6.11 is out! See what's new in the release blog

GtkDialog mapped without transient parent

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 5.5k Views 2 Watching
  • 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 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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

      Kent-DorfmanK 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

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

        Kent-DorfmanK Offline
        Kent-DorfmanK Offline
        Kent-Dorfman
        wrote on 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.

        The dystopian literature that served as a warning in my youth has become an instruction manual in my elder years.

        1 Reply Last reply
        0
        • Kent-DorfmanK Offline
          Kent-DorfmanK Offline
          Kent-Dorfman
          wrote on 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.

          The dystopian literature that served as a warning in my youth has become an instruction manual in my elder years.

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jrarmstro
            wrote on 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

            • Login

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