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

WINDOWS'API SetWindowPos do not work on QMdiSubWindow

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 4.7.0, 5.2.0
    • GUI: Window management
    • None
    • Windows 7 64bit.
      Qt 5.2.0 MINGW

      First I create a QMdiSubWindow In QMdiArea, and set it as a native window, the codes may be look like those:

      QMdiArea *pMdiArea = new QMdiArea();
      layout->AddWidget(pMdiArea);
      QMdiSubWindow *pWindow = new QMdiSubWindow();
      pWindow->setAttribute(Qt::WA_NativeWindow);
      pMidArea->AddSubWindow(pWindow);
      pWindow->showMaximized();

      Second, I got the HANDLE of QMdiSubWindow by spy++ and run the follow Windows API code:

      SetWindowPos(handle, NULL, 0, 0, 200, 200, 0x2);

      The Size of QMdiSubWindow did not changed.But the size got by Windows API (GetWindowPos)has been changed!

        1. qtbug37682_maximized_5.txt
          21 kB
          Friedemann Kleint
        2. qtbug37682.zip
          2 kB
          Friedemann Kleint
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kleint Friedemann Kleint
            chenjie4255 ChenJie
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes