4

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.

alecs1
  • 43
  • 7
  • Just create own class MyFileDialog extends QFileDialog and set wanted flag once in constructor. – Deep Oct 23 '18 at 19:01

1 Answers1

4
QCoreApplication::setAttribute(Qt::AA_DontUseNativeDialogs);
Jason Haslam
  • 2,617
  • 13
  • 19
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - [From Review](/review/low-quality-posts/21217365) – Rishikesh Raje Oct 24 '18 at 04:54
  • 1
    @RishikeshRaje It absolutely does answer the question. Why do you think it doesn't? – Jason Haslam Oct 24 '18 at 15:23
  • You should give some more explanation to your answer. Why do you think this is the correct answer? This will help future users. It was marked for deletion as the explanation was missing. – Rishikesh Raje Oct 25 '18 at 03:52
  • 2
    As a user coming here with that question, this is exactly the answer I needed – Jean-Michaël Celerier Oct 07 '20 at 14:37