[Interest] QFileDialog is lovelier the second time around...
Till Oliver Knoll
till.oliver.knoll at gmail.com
Fri Jun 14 23:02:59 CEST 2013
Am 14.06.2013 um 22:19 schrieb Duane <duane.hebert at group-upc.com>:
> On 6/14/2013 3:01 PM, Andre Somers wrote:
>> Op 14-6-2013 19:27, Constantin Makshin schreef:
>>> Try non-static QFileDialog members -- it's more likely to ignore
>>> various system [shell] extensions.
>> And way less likely to look and feel anything close to what the user
>> expects in a file dialog on his platform... At least, on windows, the Qt
>> file dialog is horrible IMHO.
> We have to be able to change descriptors based on language and do a few
> other things that prevent us from using the static ones. But the static
> ones look native and the QFileDialog doesn't.
That's because the file dialog invoked by the static flavours /is/ native, wheras the one being created by "new QFileDialog" isn't: it's a "cross-platform Qt file dialog implementation" which looks and behaves (more or less) on every desktop the same.
Now there is a Qt flag which let's you control when (not) to invoke the native dialog, and on Linux/KDE (Gnome probably, too) there is a "platform plugin/integration/thing" which "injects" the native file dialog whenever possible (unless the "native file dialog" flag has been explicitly un-/set).
That's how I remember it from Qt 4, I don't think that has changed in Qt (in the QWidget world, at least).
That said, the Qt "cross-platform file dialog" is (was?) terribly slow with network mapped drives (I remember a discussion here on qt-interest a few years ago), whereas the native version apparently takes some time to load all the system DLLs, as you say - and as someone mentioned, in case you have extensions installed such as version system integration, then those get loaded, too (if you never opened them otherwise before).
In general however you probably do want to use the native flavour, unless you use features of the Qt file dialog you explicitly want to behave on every platform the same ("file previews" come to mind).
More information about the Interest