Solved How to increase the "scrolling height" of a Qml ListView?
-
The problem is that I want my list to visible behind the banner (which is transparent). Your solution would constrain me to make the list on top of the banner.
-
This post is deleted! -
I don't really understand what you mean.
Can you please make a screenshot of your problem and draw what you are expecting ?
Here is what I did :
Here is what it looks like without adapting your list in a Rectangle :
Here with the banner on top of the listView :
I don't really get what is wrong
-
Can you layout the banner below the view rather than on top?
-
@DavidM29 So what I want is the list to be partial visible behind the transparent banner (like in your 2nd screenshot), however when the user scrolls up they are able to scroll until the content of the
ListView
sits on top of the banner. -
@daljit97 have you explored the
footer
andfooterPositioning
properties ofListView
? -
@shaan7 The problem is this a banner that needs to visible in the entire application so it cannot be attached to the
ListView
-
Add
bottomMargin: banner.height
to yourListView
EDIT: and as @shaan7 said, a
footer
with az: 2
andfooterPositioning: ListView.OverlayFooter
works too. -
@GrecKo setting the
bottomMargin
will make the view sit on top of the banner. I want the list to be behind the transparent banner and when the user is nearly at the end they can scroll the content above the bannner -
@daljit97 said in How to increase the "scrolling height" of a Qml ListView?:
@GrecKo setting the
bottomMargin
will make the view sit on top of the banner.No, it has nothing to do with that.
Just place the banner on top of yourListView
's delegate.
If your banner is a child of yourListView
, setz: 2
.
If it's a sibling of theListView
, declare it after or with a higherz
.See http://doc.qt.io/qt-5/qml-qtquick-item.html#z-prop and http://doc.qt.io/qt-5/qml-qtquick-listview.html#stacking-order-in-listview
-
@GrecKo oh thank you very much. I confused
bottomMargin
foranchors.bottomMargin
. I wasn't aware of this property being available. This is exactly what I needed!