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

Windows: transient parent is set to 0 when parent is about to be destroyed, breaking parent-child z ordering

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.9, 5.10, 5.11
    • None
    • Windows

    Description

      I have three windows: w1, w2 and w3. w1 is the transient parent of w2, and w2 is the transient parent of w3. This means that w2 is always in front of w1, and w3 is always in front of w1 and w2.

      When w2 is destroyed, the transient parent of w3 is set to 0, not w1 as one would expect. So w3 can now be hidden by w1.

      In practice, this is an issue that sometimes arises in the context of dock widgets (I have a dock widget that creates a dialog; when the dock widget is docked on the main window, the dialog loses its transient parent and can be hidden by the main window.)

      A small test case showing the problem is attached.

      Attachments

        1. qtbug-69565.cpp
          0.6 kB
        2. qtbug69565.zip
          1 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-69565
          # Subject Branch Project Status CR V

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              mauro.persano Mauro Persano
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes