Are not you better off using QFileDialog::getOpenFileName()?EDIT: Sorry, did not read your entire post. You can go about this like:Qt Code:
To copy to clipboard, switch view to plain text mode
Mainwindow.cpp
Void Mainwindow::XXXX
{
QFileDialog filedia;
filedia.
filedia.resize(200,320);
filedia.exec();
filename=filedia.XXXXXXXXXXXXXXXXXXXXXXXXXXXX
filedia.close();
if(filename.count() == 0 || filename.at(0).isEmpty())//Not sure if second condition is necessary, you can check it yourself, i'm currently away from my PC
{
QMessageBox msg;
msg.setText("no input file specified");
msg.exec();
return;
}
le->setText(filename.at(0));
}
Bookmarks