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

QWindow create() function inexplicably changes window geometry

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P2: Important P2: Important
    • None
    • 5.0.0
    • GUI: Window management
    • None
    • Windows 7

      On a Windows 7 Platform, when I create a test object derived from QWindow and call the create() function, the window geometry (specifically width) is changed. This change is not seen in Qt4.8 and may be due to changes in the underlying QPA plugins.

      For example:

      TestView::TestView(QWindow *parent)
          : QWindow(parent)
      {
          setGeometry(QRect(50, 50, 100, 100));
          setSurfaceType(QWindow::OpenGLSurface);
          qDebug() << geometry();
          create();
          qDebug() << geometry();
      }
      

      Provides the following debug output:

       
      QRect(50,50 100x100)
      QRect(50,50 116x100)
      

      After create is called the width of the window geometry is now 116, while the height is unchanged. Am I missing some critical aspect of how this should work? As mentioned, Qt 4.8 doesn't seem to exhibit the same result, and Linux & Mac do not change the geometry in this way.

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

            Unassigned Unassigned
            dpope Daniel Pope (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes