seifhatem
27th January 2011, 19:01
hey all
i did a qfiledialog and here is it's code
QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::AnyFile);
dialog.setNameFilter(tr("IMG3 File (*.img3)"));
dialog.setViewMode(QFileDialog::Detail);
QStringList fileNames;
if (dialog.exec())
fileNames = dialog.selectedFiles();
I want to get the directory of the selected file with filename and extension "C:/1.img3" and write this dir in lineedit
I tried qfileinfo but no success
Thanks in advance
i did a qfiledialog and here is it's code
QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::AnyFile);
dialog.setNameFilter(tr("IMG3 File (*.img3)"));
dialog.setViewMode(QFileDialog::Detail);
QStringList fileNames;
if (dialog.exec())
fileNames = dialog.selectedFiles();
I want to get the directory of the selected file with filename and extension "C:/1.img3" and write this dir in lineedit
I tried qfileinfo but no success
Thanks in advance