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

CLONE - QMdiArea does not show the tab correctly when using QMdiArea::TabbedView and only adding one sub-window

    XMLWordPrintable

Details

    Description

      Example to reproduce:

      #include <QtGui>

      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);

          QMainWindow* pApp = new QMainWindow();
          QMdiArea* pMdi = new QMdiArea(pApp);
          pMdi->setViewMode(QMdiArea::TabbedView);
          pApp->setCentralWidget(pMdi);

          QFrame *pWidget = new QFrame();
          pMdi->addSubWindow(pWidget);

          //Uncomment the following lines to get a good solution with two widgets
          //QFrame *pWidget2 = new QFrame();
          //pMdi->addSubWindow(pWidget2);
          
          pApp->show();
          
          return a.exec();
      }

      With only one subwindow you can watch this:

      Uncomment the declaration line of the second subwindow and all is ok.

       QFrame *pWidget2 = new QFrame();
       pMdi->addSubWindow(pWidget2);

      This example is built with 5.7.0 in VC++ 2015 64bits

      Thanks in advanced

      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
            aiwea Antonio Rivero
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes