navi1084
25th June 2009, 11:01
Dear All,
I am using QFileDialog::getSaveFileName() with the option in following way (In Windows):
QFileDialog::getSaveFileName(this, tr("m_Save As"), QDir::currentPath(),
tr("%1 Files (*.%2)")
.arg( QString("BMP"))
.arg(QString("bmp")), 0, QFileDialog:: DontUseNativeDialog);
I am facing a problem with the return value. Whenever i specify a file name then returned filename will not have extensions. Ex: If i give "Image1" as file name, the above function will return the string Image1 along with the path instead of Image1.bmp.
If I dont use "QFileDialog:: DontUseNativeDialog" option then function will return properly e.i Image1.bmp. But I dont want to use native dialog.
Can anyone suggest how can resolve this problem.???
Thank you
I am using QFileDialog::getSaveFileName() with the option in following way (In Windows):
QFileDialog::getSaveFileName(this, tr("m_Save As"), QDir::currentPath(),
tr("%1 Files (*.%2)")
.arg( QString("BMP"))
.arg(QString("bmp")), 0, QFileDialog:: DontUseNativeDialog);
I am facing a problem with the return value. Whenever i specify a file name then returned filename will not have extensions. Ex: If i give "Image1" as file name, the above function will return the string Image1 along with the path instead of Image1.bmp.
If I dont use "QFileDialog:: DontUseNativeDialog" option then function will return properly e.i Image1.bmp. But I dont want to use native dialog.
Can anyone suggest how can resolve this problem.???
Thank you