View Full Version : Howto get QFileDialog native on KDE4?

28th September 2010, 11:30

I use the static function of QFileDialog getOpenFileName() in order to get the native filedialogs.
This works with windows XP and with Ubuntu & Gnome.
The problem is that is does not work on openSUSE & KDE4.
On KDE4 I get the nonnative Qt QFileDialog.

What do I have to do to get the native KDE4 filedialog?

10th October 2010, 02:04
What you can do is get QLibrary and load the kdeui or kdekio library of it and do it that way.

10th October 2010, 07:48
Note that you can't just use QLibrary with C++ libraries.

When not using the static functions, you can set the use of native dialogs in QFileDialog. It might be worth experimenting with that.

15th November 2010, 16:33
Actually, that isn't true (at least it wasn't in 4.6.3). The native dialogs will only be opened when using the static functions. The native dialogs flag is for the static functions (convenience probably). Even when using native dialogs the whole event loop within an event loop issue (http://labs.qt.nokia.com/2010/02/23/unpredictable-exec/) can be present. Nasty stuff...