Hard Code QTFileDialog option

This commit is contained in:
wandererfan
2018-09-23 10:44:06 -04:00
committed by wmayer
parent f0bc36e6ff
commit 5d0fa3d251

View File

@@ -175,13 +175,15 @@ void FileChooser::setFileName( const QString &fn )
void FileChooser::chooseFile()
{
QFileDialog::Options dlgOpt = QFileDialog::DontUseNativeDialog;
QString fn;
if ( mode() == File )
if ( mode() == File ) {
fn = QFileDialog::getOpenFileName(this, tr("Select a file"),
lineEdit->text(), _filter);
else
fn = QFileDialog::getExistingDirectory(this, tr("Select a directory"),
lineEdit->text() );
lineEdit->text(), _filter,0,dlgOpt);
} else {
QFileDialog::Options option = QFileDialog::ShowDirsOnly | dlgOpt;
fn = QFileDialog::getExistingDirectory( this, tr( "Select a directory" ), lineEdit->text(),option );
}
if (!fn.isEmpty()) {
lineEdit->setText(fn);