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

ScrollView: would be nice to be able to set margins to the contentItem

XMLWordPrintable

      Using for example the following test case:

      import QtQuick 2.1
      import QtQuick.Controls 1.0
      
      ScrollView {
          id: scrollView
          width: 400
          height: 400
      
          Column {
             // anchors.margins: 10
              spacing: 8
              Repeater {
                  model: 30
                  Label { text: "label" + index }
              }
          }
      }
      

      It is not possible to set margins around the contentItems. It would be nice to be able to set margins.

      In tests/manual/testbench/main.qml, a column is inserted inside a ScrollView too. Attempt to set the anchors manually does not work either (and should not be needed as the child item is anchored implicitly to the scroll view). Also if you scroll down to the bottom of the properties side bar, the last item is truncated.

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

            Unassigned Unassigned
            carochao Caroline Chao (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes