[Qt-interest] QFileDialog signals

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Fri Sep 3 12:13:40 CEST 2010


On 2010-09-03 Zeljko Zeljko wrote:

>> ...
>> 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.

Well, as I already posted yesterday in this same thread at least I DON'T get the native file dialog on Windows when calling a c'tor - I just tried again with Qt 4.6.3 on Windows XP. That might be a bug or not, but currently it renders the question whether Qt could hook to those APIs (and yes, I agree with you that in this case it would possible without problems for Qt to "re-emit" those "signals" when the win32 API offers them) to an academic question, because you get the Qt file dialog anyway (when using c'tor method).

Or are you saying that you indeed manage to get a native Windows file dialog when calling a c'tor, as e.g. in:
    
    QFileDialog fd;
    QString initialDirectory = "c:/temp/";
    fd.setDirectory(initialDirectory);
    if (fd.exec()) {
        QString filePath = fd.selectedFiles().at(0);
        ...
    }

?

As I said, that gives me the Qt file dialog on Windows XP...

Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22






More information about the Qt-interest-old mailing list