QDir curDir;QString criPath = curDir.absolutePath();criPath += "/base";QFileDialog dialog(this);connect(&dialog, SIGNAL(fileSelected(const QString &)), this, SLOT(saveCritFile(const QString &)));dialog.setFileMode(QFileDialog::AnyFile);dialog.setAcceptMode(QFileDialog::AcceptSave);dialog.setDirectory(criPath);dialog.setNameFilter(tr("*.cri"));dialog.exec();
C++ (Qt)QTimer::singleShot(0, this, SLOT(readFloppy()));
QDir curDir;QString openFilesPath = curDir.absolutePath();//openFilesPath += "/base";QFileDialog::Options options = QFileDialog::DontUseNativeDialog;QString selectedFilter;QStringList files = QFileDialog::getOpenFileNames(this, tr("Open"),openFilesPath,tr("*.cri"),&selectedFilter,options);
QString fileName = QFileDialog::getOpenFileName(this,tr("Open files"), "./base",tr("My files (*.cri)"));openFile(fileName);