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

QML incorrect positioning elements if expand and collapse window

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • 5.9.2, 5.11.1, 5.11.2
    • None
    • Linux/X11

    Description

       
      I made the following minimal code example:

       

       

      import QtQuick 2.6
      import QtQuick.Window 2.2
      Window {
       visible: true
       width: 500
       height: 500
      Rectangle
       {
       anchors.fill: parent
       color: "blue"
       }
      Rectangle
       {
       x: 0
       y: 0
       width: 100
       height: 100
       color: "red"
       }
      }
      

       

      This is just a window with a blue background and a red rectangle in the upper left corner.

      The bug start when the window size changes. I cannot take screenshots, because at the time of the screenshot, the windows seem to be redrawn, and the screenshot is obtained with the "correct" content.

      Therefore, I post the video: https://youtu.be/0ewK6jrqWms

      It can be seen that if you twice click "Expand"  (first-expand, second-collapse), then the contents of the window becomes incorrect: the blue fill does not begin at the top of the window, but with some kind of vertical indent. The red square is also shifted down to the same indent.

      If you move the window, the contents of the window remains wrong, but at some point it suddenly redraws, and again becomes correct.

      This is a bug on such a simple example, but imagine what happens in a real project with a bunch of elements with calculated sizes and scaling.

      We see this bug in next configurations:

      • Qt 5.9.2 and Qt 5.11.2 (install from qt.io site) in Debian Linux 9 Stable, Openbox+LXDE, Intel i915.
      • Qt 5.11.1 in Arch Linux, KWin 5.14.0 + KDE, Intel i915 GPU

      We NOT see this bug at:

      • Plasma and KWin 5.14.4, Qt 5.11.2, nvidia-driver 415.18
      • Ubuntu 18.04, Qt 5.9.5
      • Windows 10, Qt5.11.2
      • Windows, Qt 5.12

       

      I am find workaround: if add animation to, for example, red square, for periodic move by 1 pix, this bug disappears.

       

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            xintrea Sergey Stepanov
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes