Uploaded image for project: 'Qt Solutions'
  1. Qt Solutions
  2. QTSOLBUG-131

Modal dialog with QWinWidget parent and WA_DeleteOnClose attribute is deleted when application window is hidden

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Some Release
    • MFC Migration
    • None

    Description

      Show a modal dialog which has a QWinWidget instance as a parent and which has the widget attribute WA_DeleteOnClose set.
      Hiding the MFC application window, which is the parent of the QWinWidget instance, will delete the dialog!

      QWinWidget::eventFilter
       case QEvent::Hide:
      	...
              if (w->testAttribute(Qt::WA_DeleteOnClose) && w->isWindow())
       	    deleteLater();
      	break;
      

      I expect the dialog to be hidden and reappear when the application window is shown again; certainly not deleted.

      see http://stackoverflow.com/questions/1482010/minimizing-mfc-application-with-open-qt-dialog as well

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            jbertels Jochen Bertels
            Votes:
            7 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes