Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-11590

Layout.preferredWidth + fillWidth does not render properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Not Evaluated Not Evaluated
    • QDS 4.6.2
    • QDS 4.3.2
    • 2D View
    • None

      This following piece of code:

       

      StackLayout {
            ColumnLayout {
                Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
                Layout.preferredWidth: root.width
                Layout.preferredHeight: root.height
                Layout.fillHeight: true
                Layout.fillWidth: true
      
                Button {
                    text: "Button"
                    Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
                }
           }
      }

      is created with QDS (with unnecessary details stripped out). It should have ColumnLayout be filling the entire size of StackLayout, and have the Button centered vertically and horizontally.

       

      If you compile and run the code, it has the expected behavior. However, QDS renders it as such:

      Notice that the size of ColumnLayout is not correctly rendered.

       

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

            thohartm Thomas Hartmann
            haowenl Haowen Liu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes