Force QFileDialog::DontUseNativeDialog globally in a QT program

658 Views Asked by At

To avoid the freeze at https://bugreports.qt.io/browse/QTBUG-59184 on Ubuntu Unity (and some networking issues on Windows), I'd like to force QFileDialog::DontUseNativeDialog in all the calls to the static functions of QFileDialog. Some of the calls come from third party libraries, thus it is not easy to change them individually in code, so instead I'd prefer to set some flag to the QApplication (or other means) that will apply to all those calls to QFileDialog.

1

There are 1 best solutions below

4
Jason Haslam On BEST ANSWER
QCoreApplication::setAttribute(Qt::AA_DontUseNativeDialogs);