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

Rectangle visually not in sync with window background

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8
    • Quick: SceneGraph
    • None
    • macOS, Windows

    Description

      As seen in QTBUG-129839 the drawing of a Rectangle can be out of sync with the background (clear) color when resizing a window:

       

       

      import QtQuick
      import QtQuick.Controls.Basic
      
      Window {
          id: root
      
          property bool isExpanded: false
      
          readonly property int normalWidth: 600
          readonly property int normalHeight: 300
      
          readonly property int expandedWidth: 900
          readonly property int expandedHeight: 600
      
          visible: true
      
          x: Screen.width / 2 - normalWidth / 2
          y: Screen.height / 2 - normalHeight / 2
      
          width: root.normalWidth
          height: root.normalHeight
          color: "magenta"
      
          Rectangle {
              anchors.fill: parent
              color: "black"
          }
      
          StateGroup {
              states: State {
                  name: "expanded"
                  when: root.isExpanded
      
                  PropertyChanges {
                      root {
                          width: root.expandedWidth
                          height: root.expandedHeight
                      }
                  }
              }
      
              transitions: Transition {
                  reversible: true
                  to: "expanded"
      
                  NumberAnimation {
                      properties: "width, height"
                      duration: 5000
                      easing.type: Easing.InOutQuad
                  }
              }
          }
      
          Button {
              anchors.centerIn: parent
      
              text: "Animate Window"
      
              onClicked: root.isExpanded = !root.isExpanded
          }
      }
      EditDelete 

      See initial analysis in om.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-833605

      and https://bugreports.qt.io/browse/QTBUG-129839?focusedId=833863&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-833863

       

      Attachments

        1. (gpu.expert-case-config-data)
          2 kB
        2. (gpu.quicklook-preview)
          0.5 kB
        3. (gpu.shared-tab-ui-state)
          0.2 kB
        4. appWindowResizeTest.gputrace.zip
          31 kB
        5. image-2024-10-21-14-56-01-806.png
          image-2024-10-21-14-56-01-806.png
          125 kB
        6. index
          14 kB
        7. metadata
          4 kB
        8. store0
          27 kB

        Issue Links

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

          Activity

            People

              janichol Andy Nichols
              vestbo Tor Arne Vestbø
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes