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

Reordering QDockWidgets via drag&drop doesn't work after changing dock options.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.6.1, 5.7.0
    • Fix Version/s: 5.6.2
    • Component/s: Widgets: Main Window
    • Labels:
      None
    • Environment:
      Windows 10, VS2015

      Description

      This is a regression. The problems don't occur in 5.5.1 and Qt 5.6.0 but are present in 5.6.1 and 5.7.0.

      Example code:

      #include <QApplication>
      #include <QMainWindow>
      #include <QDockWidget>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          QMainWindow w;
          w.setDockOptions(QMainWindow::AllowNestedDocks);
          w.addDockWidget(Qt::LeftDockWidgetArea, new QDockWidget("A"), Qt::Horizontal);
          w.addDockWidget(Qt::LeftDockWidgetArea, new QDockWidget("B"), Qt::Horizontal);
          w.show();
      
          return a.exec();
      }
      

      With this code reordering docks via drag&drop is not possible. Dragging seems to be ok but when releasing the mouse the dock goes back to its original position.

      If

      w.setDockOptions(QMainWindow::AllowNestedDocks);

      is changed to

      w.setDockOptions(QMainWindow::AnimatedDocks);

      reordering works on primary screen and any screen to the right. It doesn't work on screens left to the primary screen. I'm guessing something to do with negative position coords in multi-monitor setup?

        Attachments

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

          Activity

            People

            Assignee:
            mmutz Marc Mutz
            Reporter:
            chrisaverage Krzysztof Kawa
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes