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

Make it possible to restore dock widgets that are floating and NotDocked

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.9.1
    • GUI: Window management
    • None
    • Qt 5.9.1 MSVC2015x64
      Windows 10 Pro x64

      Make it possible to restore dock widgets that are floating and NotDocked:

      auto paragraphsDock = new QDockWidget(tr("Paragraphs"), this);
      paragraphsDock->setObjectName("ParagraphsDock");
      
      if (!restoreDockWidget(paragraphsDock))
         {
         paragraphsDock->setAllowedAreas(Qt::NoDockWidgetArea);
         paragraphsDock->setFloating(true);
         addDockWidget(Qt::NoDockWidgetArea, paragraphsDock);
         }

      I will add example dockwidgets.zip into attachments part.
      Step to reproduce this behavior :
      1. Run dockwidgets.zip project
      2. Move "Customers" dock widget to left dock area. Resize it.
      3. Move "Paragraphs" dock widget somewhere. Resize it.
      4. Close application. (It will save current window state in "closeEvent").
      5. Open application. (It will restore saved states in "MainWindow" constructor).
      6. Observe, that  "Customers" dock widget restores it size and position, where it was docked, and "Paragraphs" do not restore anything.

        1. dockwidgets.zip
          15 kB
          Andriy Slisarchuk
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            AndriySlisarchuk Andriy Slisarchuk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes