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

Layout.preferredWidth + fillWidth does not render properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • QDS 4.3.2
    • 2D View
    • None
    • Windows

    Description

      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.

       

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes