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

Additional property for Layouts

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • None
    • All

      Maybe we miss something and the solution is easy but we think we need a new property like "background" in GridLayout, ColumnLayout and RowLayout.

      We often create new components using layouts. An example can be a box with text and images:

      ColumnLayout {
          Text {
          }
          Text {
          }
          Image {
          }
      }
      

      But when we want to add a border or background it is no possible to add it into the Layout because it has a size and will change the size of the component. So what we currently do is something like that:

      Rectangle {
          implicitHeight: layout.implicitHeight
          implicitWidth: layout.implicitWidth
          Layout....
          [...]
          ColumnLayout {
              id: layout
              anchors.fill: parent
              ....
          }
      }
      

      Forwarding all the size properties to let the component behave in a Layout like before is error-prone and often forgotten. So a background property can solve this?

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            larss Lars Schmertmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes