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

[macOS] Closing window while modal dialog is open crashes the application

XMLWordPrintable

    • macOS
    • 332f49f2d (dev), 945c8bf54 (6.8)

      Closing the parent window while modal dialog is open on macOS crashes the application. The bug is specific to macOS and does not occur on Windows. The issue only affects modal dialogs, non-modal dialogs behave as expected. The minimal code to reproduce the bug:

      #include <QApplication>
      #include <QWidget>
      #include <QDialog>
      #include <QTimer>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          QWidget w;
          w.show();
      
          QDialog dialog(&w);
          dialog.open();
      
          QTimer timer;
          timer.setSingleShot(true);
          timer.callOnTimeout([&w](){
              w.close();
          });
          timer.start(0);
      
          return a.exec();
      }
      

       

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

            vhilshei Volker Hilsheimer
            artem.shal Artem Shal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes