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

[Reg 5.15.0 -> 5.15.1] header's width isn't resized to window's width when Layout is used

    XMLWordPrintable

Details

    • macOS, Windows

    Description

      header's and footer's width should be resized to Window's width according to https://doc.qt.io/qt-5/qml-qtquick-controls2-applicationwindow.html#header-prop
      However, it is not resized in Qt5.15.1 when layout is used. This works fine with Qt5.15.0.

      • The problem appears only when the app starts. If you resize the window, the header's width is adjusted accordingly.
      • The header's width is adjusted properly when using other component, e.g. Rectangle

      The workaround would be to bind the item's width to the parent.width but this shouldn't be necessary.

      ApplicationWindow {
      
          header: RowLayout {
              Label {
                  text: "Label 1"
              }
              Label {
                  text: "Label 2"
              }
              Label {
                  text: "Label 3"
              }
          }
      

      How to reproduce :

      Expected result (Also the result of Qt5.15.0)

      Actual result

      Attachments

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

        Activity

          People

            smd Jan Arve
            nagrohn Nahomi Gröhn (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews