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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.2
    • 5.6.1, 5.7.0
    • Widgets: Main Window
    • None
    • 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

            mmutz Marc Mutz
            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