jiapei100
19th March 2010, 13:54
Hi, all:
I'm just wondering what is the return value when canceling QFileDialog::getOpenFileName() ????
The typical example of how to use QFileDialog::getOpenFileName()
can be found at http://pepper.troll.no/s60prereleases/doc/qfiledialog.html
QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
"/home",
tr("Images (*.png *.xpm *.jpg)"));
It always return a value of type QString, no matter the user clicks "OK" or clicks "Cancel".
When "cancel", what is the return value? I mean, what is the value of "fileName" when the QFileDialog has been canceled ??
Best Regards
JIA
I'm just wondering what is the return value when canceling QFileDialog::getOpenFileName() ????
The typical example of how to use QFileDialog::getOpenFileName()
can be found at http://pepper.troll.no/s60prereleases/doc/qfiledialog.html
QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
"/home",
tr("Images (*.png *.xpm *.jpg)"));
It always return a value of type QString, no matter the user clicks "OK" or clicks "Cancel".
When "cancel", what is the return value? I mean, what is the value of "fileName" when the QFileDialog has been canceled ??
Best Regards
JIA