[Interest] adding widgets to native file dialogs?

René J.V. Bertin rjvbertin at gmail.com
Wed Feb 27 11:26:39 CET 2019


Hi,

What options are there to add widgets (e.g. a preview widget) to QFileDialog instances or descendants, which will work with "native" dialogs?

I'm looking into an issue with Scribus where this is achieved by embedding the entire QFileDialog instance into its parent, i.e. by setting it to be a Qt::Widget. This works fine with non-native dialogs, but with the native dialogs I've tested it with (KDE & Mac) the dialog still opens as an additional window; on Mac it will even appear behind the window in which it's supposed to be embedded (and which retains focus so the dialog cannot be used).
That issue appears to be due to a design oversight (?) in Qt, where the user and the application interact with 2 distinct dialog windows.

I've looked around for answers in the usual places; there are quite a few but they all use non-native dialogs...

Thanks,
R.



More information about the Interest mailing list