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

QDockWidget group window still visible when empty (regression)

    XMLWordPrintable

Details

    • Linux/X11, Windows
    • 814b7fd3a (dev), ea9f37469 (6.6), cda2a0031 (6.5), 3fec5b5be (tqtc/lts-6.2), e03bc88a8 (dev), efc4bf5e6 (dev), 15ed84677 (6.6), 95cdc8c1d (6.6), 2812dba9a (6.5), c1b94e48d (6.5), ec33e6507 (tqtc/lts-6.2)

    Description

      When floating two dockwidgets into the same window, a "group window" is created, with a tabbar. It's supposed to be hidden when there are no visible dockwidgets anymore, and this was the case in Qt 5.9.

      However in Qt 5.15 this is no longer the case.

      Testcase attached. Steps to reproduce:

      • Click on the View button
      • Drag out the Objects and Optimization dockwidgets into a separate tabbed window
      • Click on the Home or Process button
      • the code hides the dockwidgets, and yet the group window remains visible

      I have debugged this to a nasty case of show() calling hide() internally, on the same widget

       

      #1  0x00007ffff77e9b4e in QWidget::setAttribute (this=0x704b70, attribute=Qt::WA_WState_Hidden, on=true) at /d/qt/5/kde/qtbase/src/widgets/kernel/qwidget.cpp:10951
      #2  0x00007ffff77e3afd in QWidgetPrivate::setVisible (this=0xae8570, visible=false) at /d/qt/5/kde/qtbase/src/widgets/kernel/qwidget.cpp:8145
      #3  0x00007ffff77e3628 in QWidget::setVisible (this=0x704b70, visible=false) at /d/qt/5/kde/qtbase/src/widgets/kernel/qwidget.cpp:8058
      #4  0x00007ffff77e3178 in QWidget::hide (this=0x704b70) at /d/qt/5/kde/qtbase/src/widgets/kernel/qwidget.cpp:7931
      #5  0x00007ffff7964c9e in QDockWidgetGroupWindow::destroyOrHideIfEmpty (this=0x704b70) at /d/qt/5/kde/qtbase/src/widgets/widgets/qmainwindowlayout.cpp:430
      #6  0x00007ffff796e745 in QDockWidgetGroupLayout::setGeometry (this=0xbe8c30, r=...) at /d/qt/5/kde/qtbase/src/widgets/widgets/qmainwindowlayout.cpp:249
      #7  0x00007ffff77c0b83 in QLayoutPrivate::doResize (this=0x7fffe40066d0) at /d/qt/5/kde/qtbase/src/widgets/kernel/qlayout.cpp:594
      #8  0x00007ffff77c28d2 in QLayout::activate (this=0xbe8c30) at /d/qt/5/kde/qtbase/src/widgets/kernel/qlayout.cpp:1117
      #9  0x00007ffff77e3812 in QWidgetPrivate::setVisible (this=0xae8570, visible=true) at /d/qt/5/kde/qtbase/src/widgets/kernel/qwidget.cpp:8096
      #10 0x00007ffff77e3628 in QWidget::setVisible (this=0x704b70, visible=true) at /d/qt/5/kde/qtbase/src/widgets/kernel/qwidget.cpp:8058
      #11 0x00007ffff77e246f in QWidget::show (this=0x704b70) at /d/qt/5/kde/qtbase/src/widgets/kernel/qwidget.cpp:7684
      #12 0x00007ffff79654ae in QDockWidgetGroupWindow::adjustFlags (this=0x704b70) at /d/qt/5/kde/qtbase/src/widgets/widgets/qmainwindowlayout.cpp:512#13 0x00007ffff792821c in QDockAreaLayoutInfo::updateTabBar (this=0x7fffe4007000) at /d/qt/5/kde/qtbase/src/widgets/widgets/qdockarealayout.cpp:2147
      #14 0x00007ffff7928408 in QDockAreaLayoutInfo::usedTabBars (this=0x7fffe4007000) at /d/qt/5/kde/qtbase/src/widgets/widgets/qdockarealayout.cpp:2189
      #15 0x00007ffff7928469 in QDockAreaLayoutInfo::usedTabBars (this=0xbe8ca0) at /d/qt/5/kde/qtbase/src/widgets/widgets/qdockarealayout.cpp:2196
      #16 0x00007ffff796d62f in QMainWindowLayout::applyState (this=0x87f180, newState=..., animate=false) at /d/qt/5/kde/qtbase/src/widgets/widgets/qmainwindowlayout.cpp:2736
      #17 0x00007ffff7969b82 in QMainWindowLayout::setGeometry (this=0x87f180, _r=...) at /d/qt/5/kde/qtbase/src/widgets/widgets/qmainwindowlayout.cpp:1980
      #18 0x00007ffff77c0b83 in QLayoutPrivate::doResize (this=0xa63e90) at /d/qt/5/kde/qtbase/src/widgets/kernel/qlayout.cpp:594
      #19 0x00007ffff77c28d2 in QLayout::activate (this=0x87f180) at /d/qt/5/kde/qtbase/src/widgets/kernel/qlayout.cpp:1117
      #20 0x00007ffff77e3853 in QWidgetPrivate::setVisible (this=0x8c9dd0, visible=true) at /d/qt/5/kde/qtbase/src/widgets/kernel/qwidget.cpp:8101
      #21 0x00007ffff77e3628 in QWidget::setVisible (this=0x595960, visible=true) at /d/qt/5/kde/qtbase/src/widgets/kernel/qwidget.cpp:8058
      #22 0x00007ffff77e246f in QWidget::show (this=0x595960) at /d/qt/5/kde/qtbase/src/widgets/kernel/qwidget.cpp:7684
      #23 0x00007ffff77cb23c in QStackedLayout::setCurrentIndex (this=0x898520, index=0) at /d/qt/5/kde/qtbase/src/widgets/kernel/qstackedlayout.cpp:323 

       

      destroyOrHideIfEmpty() at frame #5 does the right thing in trying to hide the empty group window, but the caller at frame #11 is show(), which finishes the job so the window ends up being visible after all.

      Attachments

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

        Activity

          People

            axelspoerl Axel Spoerl
            dfaure_kdab David Faure
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: