From 5d0fa3d2515bbc562e2cd4be420591b7af538a7b Mon Sep 17 00:00:00 2001 From: wandererfan Date: Sun, 23 Sep 2018 10:44:06 -0400 Subject: [PATCH] Hard Code QTFileDialog option --- src/Tools/plugins/widget/customwidgets.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Tools/plugins/widget/customwidgets.cpp b/src/Tools/plugins/widget/customwidgets.cpp index 01e7c5c6b4..ded75d7aac 100644 --- a/src/Tools/plugins/widget/customwidgets.cpp +++ b/src/Tools/plugins/widget/customwidgets.cpp @@ -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);