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

Restoring a QMdiSubWindow when QMdiArea viewMode is QMdiArea::TabbedView

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • Some future release
    • 4.4.0
    • GUI: Workspace
    • None

    Description

      When a QMdiArea's viewMode is QMdiArea::SubWindowView (the default), the user can minimize/maximize/restore the sub window via buttons on the QMdiSubWindow's title bar.

      When the viewMode is set to QMdiArea::TabbedView, the user can right click on the tabs to display a menu allowing the tab to be closed or restored.

      Closing the tab seems to work fine; however restoring the tab produces an odd behavior.

      Restoring the tabbed sub window forces all tabbed sub windows to become floating windows. This can be expected. However, the tab bar still remains visible allowing the user multiple ways to interact with the sub window.

      Now that the sub window is floating, the user can right click on either the tab or title bar for the sub window and select "Stay on Top".

      When the sub windows are returned to tabbed view (by maximizing any floating sub window) the window that was selected to "Stay on Top" is now visibly floating on top of the other tabbed sub windows.

      Test case main.cpp to reproduce
      ================================
      #include <QtGui>

      class MainWindow : public QMainWindow
      {
      Q_OBJECT
      public:
      MainWindow(QWidget *parent = 0)
      : QMainWindow(parent)

      { QMdiArea *mdiArea = new QMdiArea; mdiArea->setViewMode(QMdiArea::TabbedView); setCentralWidget(mdiArea); QMdiSubWindow *sub1 = mdiArea->addSubWindow(new QTextEdit); QMdiSubWindow *sub2 = mdiArea->addSubWindow(new QTextEdit); QMdiSubWindow *sub3 = mdiArea->addSubWindow(new QTextEdit); }

      };

      #include "main.moc"

      int main(int argc, char **argv)
      {
      QApplication a(argc, argv);
      MainWindow mw;
      mw.show();
      return a.exec();
      }

      Attachments

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

        Activity

          People

            bjnilsen Bjørn Erik Nilsen
            gpf Shane McLaughlin
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes