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

QMdiSubWindow's size decrease when deactivate

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 4.7.0, 5.2.0
    • GUI: Window management
    • None
    • windows 7 64bit
      qt 5.2.0 mingw4.8

    Description

      A QMdiArea has two QMidSubWindow, which of them are both showMaximized(), however, I found the size of the deactivate one is the normal size.
      code is as below:
      int main(int argc, char *argv[])
      {
      QApplication a(argc, argv);

      QMdiArea* pArea = new QMdiArea();
      QMdiSubWindow* pW1 = new QMdiSubWindow();
      QMdiSubWindow* pW2 = new QMdiSubWindow();

      pArea->show();
      pArea->addSubWindow(pW1);
      pArea->addSubWindow(pW2);
      pArea->resize(500,500);
      pW1->showMaximized();
      pW2->showMaximized();

      qDebug() << "W1:" << pW1->size(); // output 139,37
      qDebug() << "W2:" << pW2->size(); // output 500,500

      return a.exec();
      }

      I saw the source code and I found that a maximized QMdiSubWindow would do shorNormal() when it become deactivated, but I can't get it. Why?

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            chenjie4255 ChenJie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes