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

Provide content alignment for Flickable item

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • None
    • Quick: Other
    • None

      There's no clear way to align Flickable item content inside of the the item. For example in some cases ListView content is wanted to be aligned to bottom. It should be possible without changing list ordering like Listview.BottomToTop does.

      So there should be some content alignment property to align Flickable item content. It could be horizontal & vertical alignment properties like Text element has:
      Flickable.contentHorizontalAlignment
      Flickable.contentVerticalAlignment

      Or anchor like Item has:
      Flickable.contentAnchors

      Anchoring might give possibility to anchor content outside the Flickable item. Don't know is that good or bad.

      For the listView bottom alignment issue there's workaround to use topMargin depending of the contentHeight:

          ListView {
              anchors.fill: parent
              model: ListModel {
                  ListElement { name: "first" }
                  ListElement { name: "second" }
                  ListElement { name: "third" }
              }
             topMargin: height-contentHeight
              delegate: Text {
                  width: ListView.view.width
                  text: name
              }
          }
      

        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
            qtcomsupport Qt Support
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes