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

[Reg 6.7.0 -> dev] Bindings on width/height of ApplicationWindow.background are not respected

    XMLWordPrintable

Details

    • a9e6cbb06 (dev), 4d7fcc9cf (6.8), 946ea1cc5 (6.7), 93a18c046 (tqtc/lts-6.5)

    Description

      Reverting https://codereview.qt-project.org/c/qt/qtdeclarative/+/546613 fixes the issue. That patch is meant to make QQuickApplicationWindow check to see if the user has set an explicit width/height, but that check doesn't seem to be working correctly?

      Code

      import QtQuick
      import QtQuick.Controls.Basic
      
      ApplicationWindow {
          id: window
          width: 640
          height: 480
          visible: true
      
          background: Rectangle {
              property real scaleFactor: shrinkBtn.checked ? 0.5 : 1
      
              color: "green"
              width: window.width * scaleFactor
              height: window.height * scaleFactor
              anchors.centerIn: parent
          }
      
          Button {
              id: shrinkBtn
              checkable: true
              text: "Shrink Background"
          }
      }
      

       

      Expected outcome when button is checked (Qt 6.7.0)
      The green background becomes half the size of the window

       

      Actual outcome when button is checked (dev, 2024-04-25)
      The green background remains the same size as the window

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-124744
          # Subject Branch Project Status CR V

          Activity

            People

              mitch_curtis Mitch Curtis
              skoh-qt Sze Howe Koh
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes