Caveat about QFileDialog

Kevin Ottens ervin at kde.org
Thu Nov 17 15:07:19 UTC 2011


On Thursday 17 November 2011 15:42:48 Volker Krause wrote:
> On Wednesday 16 November 2011 18:39:57 Kevin Kofler wrote:
> > But the problem is: At least in Qt 4.8 (I haven't checked Qt 5 yet
> > because browsing its submodules in the Gitorious interface doesn't work
> > properly), only the STATIC API of QFileDialog supports platform
> > dialogs. If you construct a QFileDialog OBJECT as the above commit
> > does, you always get the ugly Qt-only dialog! So it's a very bad idea
> > to do that.
> 
> Did you actually test this? Because the following simple test (based on the
> referred code) works just fine here and shows the native KDE dialog:

In my experience it's apparently an environment dependent thing and depending 
on the distro YMMV. For instance here, if I run from the command line I get 
the Qt one, if I run from krunner I get the file dialog. Sounds like Qt not 
catching in which environment you are sometimes.

I get a similar issue with the QStyle it picks by default. It's somewhat 
recent, and I'm not sure where to look to get that fixed.

Regards.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud patron of KDE, http://www.kdab.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20111117/b4c6b5fd/attachment.sig>


More information about the Kde-frameworks-devel mailing list