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

midArea->setActiveSubWindow() will NOT work, if called after setViewMode(QMdiArea::TabbedView)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.10.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Win7 64-bit. Qt 5.10.1

      Description

      midArea->setActiveSubWindow() will not work, if call setViewMode(QMdiArea::TabbedView) before adding the sub-windows. 

      _mdi_area->setViewMode(QMdiArea::TabbedView);
      _mdi_area->setDocumentMode(true);
      _mdi_area->setTabsMovable(false);
      this->setCentralWidget(_mdi_area);

      .....

      QMdiSubWindow *win1 = _mdi_area->addSubWindow(child1);
      win->showMaximized();
      QMdiSubWindow *win2 = _mdi_area->addSubWindow(child2);
      win->showMaximized();
      _mdi_area->setActiveSubWindow(win1);

      After launching, the active sub-window will be win2. But if move the clause "_mdi_area->setViewMode(QMdiArea::TabbedView);" to the last line, then the current active sub-window will be win1 as expected. 

        Attachments

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

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            diverger Hua Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes