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

QMainWindow: tabbed QDockWidgets leave invisible QTabBar

    XMLWordPrintable

Details

    • e6d85cf28 (dev), a884cf6e8 (tqtc/lts-6.5), 9557d1ca9 (6.6)

    Description

      When using tabbed QDockWidgets with QMainWindow, the dock area's QTabBar widget stays around even after closing all tabs. It's not visible, but it can still receive keyboard focus via Tab. In addition, it's stored and restored by saveState/restoreState so if these functions are used, not even restarting the application gets rid of the hidden QTabBar.

      Steps to reproduce with the attached sample:

      1) Build and run the program.
      2) Press Tab to move the focus. Note that it cycles between the two buttons.
      3) Click "Open Dock" several times to create some tabbed docks.
      4) Click "Close All Docks" to close all docks.
      5) Press Tab again. Note that the focus order now includes an invisible QTabBar.
      6) Close and relaunch the program.
      7) Press Tab again. The focus order still includes the invisible QTabBar since restoreState restored it.

      Qt 5.6 looks to be worse than older versions because it seems it can accumulate multiple invisible QTabBars over time if these steps are repeated.

      Attachments

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

        Activity

          People

            axelspoerl Axel Spoerl
            jirauser16803 user-c388c (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes