Results 1 to 5 of 5

Thread: QFileDialog Question

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QFileDialog Question

    Okay, so this is starting to make some sense. We are forced to use Gnome and when I run some applications, I get an error: GTK-Message: GTKDialog mapped without a transient parent. This is discouraged.

    So maybe it is trying to use the GTKDialog for the QFileDialog, and I get this error as it doesn't know how to use a QMainWindow for its parent. And then maybe if I don't use the native dialog like you suggest, it will work. I wasn't certain if I was using the native dialog because the documentation wasn't clear in Linux:

    On Windows, and macOS, this static function will use the native file dialog and not a QFileDialog.
    It never mentioned Linux so I assumed it was using the QFileDialog, but I think it is now using the GTKDialog so I will try disabling this and see what happens. Thanks for your help

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QFileDialog Question

    Quote Originally Posted by ToddAtWSU View Post
    get an error: GTK-Message: GTKDialog mapped without a transient parent. This is discouraged.
    This is probably just a warning, not an error.

    As far as I understand the "transient parent" is the window which the dialog should be placed on top of, otherwise the dialog could theoretically be move "below" the parent.
    It should still work though.

    Quote Originally Posted by d_stranz View Post
    So maybe it is trying to use the GTKDialog for the QFileDialog, and I get this error as it doesn't know how to use a QMainWindow for its parent.
    This kind of window relationship is handled on the level of window system handles, e.g. X11 window IDs, so this shouldn't be a problem.

    But of course there could be limitation on the integration API and/or bugs.

    Cheers,
    _

Similar Threads

  1. QFileDialog question
    By vuletic in forum Newbie
    Replies: 6
    Last Post: 14th March 2015, 23:51
  2. Replies: 7
    Last Post: 5th March 2014, 17:36
  3. QFileDialog Question
    By sgrant327 in forum Qt Programming
    Replies: 4
    Last Post: 10th September 2010, 14:05
  4. Replies: 0
    Last Post: 31st March 2010, 12:40
  5. A question about QFileDialog::getSaveFileName
    By Ali in forum Qt Programming
    Replies: 1
    Last Post: 12th October 2007, 19:46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.