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

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

    XMLWordPrintable

Details

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

    Description

      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.

      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
            AndriySlisarchuk Andriy Slisarchuk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes