[Qt-interest] Qt-4.5: QFileDialog & Options
Alexis Ménard
alexis.menard at trolltech.com
Wed Apr 22 18:24:15 CEST 2009
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 have no
control on the native one. So, why not using the Qt one instead?
>
> --
> J-P Nurmi
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
--
Alexis Ménard
Software Engineer, Widgets Team 1
Qt Software, Nokia Norge AS, Sandakerveien 116, 0484 Oslo, Norway
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090422/b0b211d4/attachment.html
More information about the Qt-interest-old
mailing list