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

QWindow rendered with OpenGL has wrong alignment

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 5.12.2
    • GUI: OpenGL
    • None
    • Linux/X11, Windows

    Description

      When creating a QWindow with surface type "OpenGLSurface" and placing it to window container, the window area is shifted left and down. I've attached the simple source code i used to reproduce the issue.

      "MainWindow" class creates a QWindow and a container for it, and then with show event adds this container to its layout.

      "NativeWindow" inherits from QWindow, and uses OpenGL to only draw a diagonal line from top left to bottom right corner.

      Compiling and running the code with Qt 5.12.2 the diagonal is shifted

      ,

      while using Qt 5.6.0 makes it placed correctly:

      I've checked it on Windows, but there was a bug report from my colleagues that the same happens on Linux.

      Attachments

        1. Diagonal_5_12_2.png
          Diagonal_5_12_2.png
          3 kB
        2. Diagonal_5_6_0.png
          Diagonal_5_6_0.png
          3 kB
        3. qtbug74722.zip
          2 kB
        4. WindowContainer.7z
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            natalia_rybakova Natalia Rybakova
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes