[Qt-interest] Qt-4.5: QFileDialog & Options
Zeljko
zeljko at holobit.net
Thu Apr 23 08:35:16 CEST 2009
Alexis Ménard wrote:
> On Wednesday 22 April 2009 17:30:53 J-P Nurmi wrote:
>> On Wed, Apr 22, 2009 at 6:10 PM, Zeljko <zeljko at holobit.net> wrote:
>> > Hi,
>> > How to create native QFileDialog under win32/mac , but without using
>> > static getFileName() etc .. ?
>> > I need non-static QFileDialog because of signals like filterSelected(),
>> > currentChanged() etc ...
>> > I've tried MyFileDialog->setOption(QFileDialog::DontUseNativeDialog,
>> > False) before calling to exec() but it doesn't help - dialog is
>> > non-native ? Anyone ?
>>
>> Hi,
>>
>> The only way to use native file dialogs is to use those static
>> methods. What they actually do is that they create a native dialog
>> (ie. not QFileDialog) by using platform-specific APIs where available.
>> Plain QFileDialog is used elsewhere. QFileDialog is a cross-platform
>> file dialog implementation. If you create a QFileDialog, there is no
>> way to turn it as a native file dialog.
>
> This is partially false :D. Since 4.5 on the mac if you use the class
> QFileDialog (not static functions), it will display the native Mac dialog
> unless you give the flag QFileDialog::DontUseNativeDialog. Unfortunately
> this feature is not implemented for Windows. As J-P Nurmi wrote the only
> way to get the native dialog on Windows is static functions. Of course you
Ah...now I see. But it's bad documented. You should say that in
documentation for QFileDialog options.
> have no control on the native one. So, why not using the Qt one instead?
Because I need native look & signals :)
More information about the Qt-interest-old
mailing list