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

QDockWidget not correctly parented/setup if dragged from another floating and tabified QDockWidget

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.15.8, 6.2.2
    • Fix Version/s: 6.4.0 Beta1
    • Component/s: Widgets: Main Window
    • Labels:
      None
    • Platform/s:
      Linux/X11, macOS, Windows
    • Commits:
      9ff40b59da (qt/qtbase/dev) 9ff40b59da (qt/tqtc-qtbase/dev)

      Description

      Steps to reproduce:

      In code:

      • create QMainWindow with centralwidget and other stuff
      • add two QDockWidgets (floatable|closeable|moveable)
      • tabify the docks.

      while runtime

      • start application
      • drag the two tabified docks to make them floating (but keep them tabified).
      • drag the other tabified dock out of the floating window
      • situation 3 windows. 

      observations/errors:

      • *QMainWindowLayout::tabPosition called with out-of-bounds value '0'* in console after making the second dock floating, moving that dock or closing. (duplicate of QTBUG-88157 ? )
      • closing the QMainWindow in this state does not close the second QDockWidget. Application hangs. The widget needs to be closed manually (Difficult since  the QDockWidget losses focus completely and gets burried by other open Applications)
      • closing the buggy QDockWidget before QMainWindow hangs the application on closing the QMainWindow without any means of recovery. (Just waits forever in an emit awake() in qeventdispatcher_win.cpp @ line 554)
      • the second QDockWidget is not able to dock the first QDockWidget (but the other way around works; also works if the docks are undocked individually.)
      • sometimes runtime crashes at qdockerlayout.cpp @ line 1270 (access violation; probably has something to do if a layout is missing from the Widget inside the QDockWidget; didn't Encounter it after adding layouts to them)

      Code: (attached)

        Attachments

        1. main.cpp
          2 kB
        2. testing-qt.cpp
          6 kB
        3. testing-qt.hpp
          0.8 kB

          Issue Links

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

            Activity

              People

              Assignee:
              axelspoerl Axel Spoerl
              Reporter:
              neumann-a Alexander Neumann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There is 1 open Gerrit change