Hi
I'm using this function to get a file name.
void class::function(){
tr("QFileDialog::getOpenFileName()"),
lineEdit->text(),
tr("PNG image format (*.png)"),
&selectedFilter,
options);
if (!fileName.isEmpty())
lineEdit->setText(fileName);
}
void class::function(){
QFileDialog::Options options;
QString selectedFilter;
QString fileName = QFileDialog::getOpenFileName(this,
tr("QFileDialog::getOpenFileName()"),
lineEdit->text(),
tr("PNG image format (*.png)"),
&selectedFilter,
options);
if (!fileName.isEmpty())
lineEdit->setText(fileName);
}
To copy to clipboard, switch view to plain text mode
How can i know if the user pressed Ok or Cancel?
Thanks
Bookmarks