Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-140171

QFileDialog crashes when DontUseNativeDialog is set to False

XMLWordPrintable

    • Windows

      NOTE: I could reproduce this on only Windows 11.
      Attached a simplified PyQt script.
      We have the slot `dirEntered` which is executed when the dialog fires `directoryEntered` signal. In the script, we are calling `done(QFileDialog.Accepted)` if user selects `Desktop` directory (can be any directory, i used Desktop for an example) and this seems to cause the crash.
      This doesn't cause a crash in case of non-native dialogs. The only way I found which can fix this is delaying the `done` call using a `QTimer`.
      From my understanding, the underlying windows native dialog is getting destructed while we are still processing the directory changed event.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            sohamkanji Soham Kanji
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes