QFileDialog dlg(this); dlg.setDirectory("/home/dd"); connect(&dlg, SIGNAL(directoryEntered(QString)), SLOT(slotDirEntered(QString))); dlg.exec();
void MainWindow::slotDirEntered(QString param){ ((QFileDialog*)sender())->setDirectory("/home/dd");}