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

Layout.width = height Initial Value does not seem to be applied any longer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P1: Critical
    • None
    • 6.4.0, 6.5.0
    • Quick: Layouts
    • None
    • Linux/X11

    Description

      In Qt < 6.4 the following assignment in a Layout gets properly initialized when the height itself is dependent on other bindings:

      Button {
      Layout.maximumWidth: height
      Layout.minimumWidth: height
      }
      

      In Qt6.4 something seems to be wonky with the initialization order / binding order.

      The button is, upon startup of the application not square as expected. It rather is rectangular. Once you click the button and a secondary toolbar is shown which changes the height of the whole top toolbar, the buttons are square and stay square.

      I have attached a minimal demo project.

      Attachments

        1. after-height-change.PNG
          after-height-change.PNG
          21 kB
        2. after-second-height-change.PNG
          after-second-height-change.PNG
          13 kB
        3. after-startup.PNG
          after-startup.PNG
          14 kB
        4. layout-changes.zip
          5 kB
        5. qt6_3_1.PNG
          qt6_3_1.PNG
          17 kB
        6. still-happens.PNG
          still-happens.PNG
          18 kB
        7. still-happens2.PNG
          still-happens2.PNG
          21 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jokarlss Jonas Karlsson
            denishessberger Denis Hessberger
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes