C++ (Qt)QTextCodec *codec = QTextCodec::codecForLocale();QTextCodec::setCodecForCStrings(codec);QTextCodec::setCodecForLocale(codec);QTextCodec::setCodecForTr(codec);
QFileDialog *aDialog = new QFileDialog(this,QString::fromUtf8("Выберите папку для временных файлов..."),QDir::tempPath()); aDialog->setFileMode(QFileDialog::DirectoryOnly); const int ret = aDialog->exec(); const QStringList fileNames = aDialog->selectedFiles(); delete aDialog; //чуть не забыл QString file ( (ret == QDialog::Accepted && !fileNames.isEmpty() )? fileNames[0] : QString::null);
delete aDialog; //чуть не забыл