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

QDockWidget: Unsetting DockWidgetFeature::DockWidgetMovable has no effect for floating dock widgets

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.13
    • None
    • 3364be785930548bde2e6dfebe3aabed9e3f780d (qt/qtbase/wip/qt6)

    Description

      Currently, floating the widget will allow the user to move the widget - even if we try and restrict this via setFeatures(features() & ~QDockWidget::DockWidgetFeature::DockWidgetMovable).

      That is. docks can be redocked into a different area after made floating.

      But is this appropriate if we really don't want to allow the user to move the dock widgets around?

      So we could either:

      A) Change Line 925 in QDockWidget.cpp to:

      state->ctrlDrag = (hasFeature(this, QDockWidget::DockWidgetFloatable) && event->modifiers() & Qt::ControlModifier) ||
      (!hasFeature(this, QDockWidget::DockWidgetMovable) && q->isFloating());

       B) Add an extra DockWidgetFeature to allow this move when floating behaviour to be enabled/disabled.

       

      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
            nickdademo Nick D'Ademo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes