(QML) Flickable not working as supposed
So, while building an Ubuntu app I needed to use flickable
for scrolling, so now I have code of the form
Page{
...
Flickable {
anchors.fill: parent
content.height: element1.height + element2.height ...
...
}
}
When I run it on my phone (ubuntu utopic), the default position of the flickable is a few hundred pixels lower than the header. When I flick it up, it stays in the correct position it's supposed to stay from the start. Also, when using pagestack to push another page, then come back to this one it stays in the right position. Why is this and how can I fix it, so that it can be in the right position from the start.
Note: I've tried many combinations with anchors, width, height, everything. One time I did get it to stay in the position, but when flicking up it overlapped the header.
There's way to little qml to see what's going on, especially since all components positions affect each other.
One solution would be to do the thing you did to get your flickable in the correct position, and then add the clip: true
property to stop it from overlapping the header.