[Qt-interest] Moving the native file open dialog on Windows
Oliver Demetz
forenbeitraege at oliverdemetz.de
Sun Sep 6 09:58:13 CEST 2009
Hi!
Up to now I have been successfully using the static method
QFileDialog::getOpenFileName(...) to choose a file.
Now I would like to show a second widget to the user while he is
browsing the dialog for the file. This is easy:
PhotographingInstructionsWidget * piw = new
PhotographingInstructionsWidget(this, Qt::Window);
piw->show();
QString filename = QFileDialog::getOpenFileName(NULL, "Get File");
piw->close();
BUT:
The problem is that the file dialog is modal and thus on to of the
information widget.
And I have no clue how to specify the position of the native file dialog!
It seems that the position of the dialog is almost random, I cant see a
valid rule behind it.
A note: For some reason, I have to set the parent argument of the static
method to NULL, it is a must.
What I tried is not using the static function, and instantiation a
QFileDialog and calling exec() on this. But the resulting dialog is
really slow and, in my oppinion, does not really fit to the MS Windows
fool and feel. I would like to stick to the natice dialog.
Thanks for your suggestions in advance,
Oliver
More information about the Qt-interest-old
mailing list