[Qt-interest] QFileDialog signals

Zeljko zeljko at holobit.net
Fri Sep 3 10:07:45 CEST 2010


Oliver.Knoll at comit.ch wrote:

> On 2010-09-02 Zeljko Zeljko wrote:

> Implement /what/ exactly? Change the native dialog, such that it signals

Hook signals from native dialogs into QFileDialog.

> whether the filter has changed or not? How in your opinion should that be
> done? ;)

It can be done as I already mentioned. win32 api dialogs emits such signals
(message), gtk2 too. Dunno for KDE dialogs.

> 
>> I know that it's implementable (at least for win32 dialogs and gtk2
>> dialogs) but
> 
> Are you SURE? Because on Windows you DON'T get the native dialog when you
> create a QFileDialog instance via c'tors - you get the Qt flavour of the
> file dialog, which off course emits those signals. But Qt can't have an
> influence on what the native file dialog "emits" and what not.

Yes I'm pretty sure that it's implementable.

> Then again it also depends on the underlying API: maybe you are right
> (when you really refer to the native file dialog, as instantiated by the
> *static* methods in QFileDialog!), and the underlying Win32 API indeed
> "signals" somehow that something (such as the filter) has changed in the
> native file dialog instance and Qt can then somehow pickup that event and
> send the appropriate signal.
> 
> But on second thought that totally does not make any sense, since you
> don't even get access to the actual QFileDialog instance when calling the
> static methods, so you could not even connect to those signals...

I don't want to call STATIC methods but QFileDialog constructor as I already
mentioned.

>> wondering if it ever will be in qt.
> 
> Unlikely, since we are talking about 3rd party code where Qt has no
> influence upon ;) (Well, in theory you could convince the KDE guys to
> implement such functionality, and since Qt and KDE are very "close"... who
> knows ;)

Again, not talking about KDE dialogs (which probably does not have such
functionality) but about things for which I'm sure: win32 API, gtk2 API
both emits messages/signals which can be hooked.
Anyway, now I'm pretty sure that QFileDialog won't have such functionality
for some time so I'll stuck with non-native dialogs.


zeljko






More information about the Qt-interest-old mailing list