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

It should not be possible to close a non-closable floating QDockWidget with keyboard shortcuts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.14, 6.7.1
    • None
    • Linux/X11

    Description

      Hi all

      This surfaced in KDE Bug #488597. I later on reported this problem as KDE Bug #488616 (as I thought this would be a window manager issue), but there I was told this was an upstream issue and thus I should report it to Qt directly.

      The problem is that a QDockWidget that is declared as non-closable but as floatable cannot be closed by clicking an "X" button (it's omitted then), but one can actually close such a floating dock nevertheless by using a keyboard shortcut (Alt+F4).

      After that, there's no way to re-show that closed dock, as the menu bar's context menu containing checkboxes for all dock widgets is grayed out (it becomes enabled when adding docks with the QDockWidget::DockWidgetClosable feature set). The only way to get the dock back is to delete the window state from the rc file (in case of KGeoTag, as the default dock arrangement will be restored then).

      My understanding is that a QDockWidget that is marked as not closable should not only not be closable by omitting the "X"/"Close" button, but also an attempt to close it using keyboard shortcuts should be ignored, to also prevent it from closing this way.

      Cheers, Tobias

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            l3u Tobias Leupold
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes