QML scrollable row element
Hi,
again I am completely stuck here. I would like to create column with two rows. The first row I kind of a title row and shall stay at the top. The second "row" contains a ListView with logs. I would like to have this ListView scrollable but I am just not getting it right.
This is my structure:
Code:
SilicaFlickable {
Column {
Row { // Title }
Flickable {
width: page.width
height: column.height - titleRow.height
flickableDirection: Flickable.VerticalFlick
VerticalScrollDecorator {}
clip: true
ListView {}
}
}
}
The ListView is scrolling now but as soon as I leave it it scrolles back to it initial state. How can I prevent that or how can I do this better?
Thanks
Re: QML scrollable row element
What is the purpose of a Flickable element you declare in line #4?
A column with two rows where one is a title row and the other is a list view looks more or less like this:
Code:
Column {
anchors.fill: parent // or whetever
Item { id: title /* ... */ }
ListView { id: view }
}
Re: QML scrollable row element
Hi,
the Flickable is the container I wanted to be scrollable. But I does not behave as I hope. I will try your structure.
Thanks
Re: QML scrollable row element
Re: QML scrollable row element
The ListView contains several lines.
I finally fixed by attaching the ListView to the bottom of the column and assigning a specific hight. Then the SilicaListView will automatically scroll when the list is too long.
Re: QML scrollable row element
Quote:
Originally Posted by
KeineAhnung
The ListView contains several lines.
ListView is already scrollable.