I'm trying to display an ActivityIndicator
while my list data is loading. Here's my Page QML:
Page {
signal articleClicked(variant article)
id: root
titleBar: TitleBar {
title: qsTr("All feeds")
visibility: ChromeVisibility.Visible
} // titleBar
Container {
layout: DockLayout {}
ListView {
dataModel: _feedModel
listItemComponents: [
ListItemComponent {
type: "item"
FeedListComponent {
feed: ListItemData
}
}
]
visible: !_manager.working
onTriggered: {
if (indexPath.length > 1) {
root.articleClicked(dataModel.data(indexPath));
}
}
} // ListView
ActivityIndicator {
verticalAlignment: VerticalAlignment.Fill
horizontalAlignment: HorizontalAlignment.Fill
running: _manager.working
}
} // Root container
} // Page
To display the ActivityIndicator
centered, I'm using a DockLayout
. It's working fine. However, when I switch _manager.working
to false
and display the ListView
, I can't scroll. I guess it's not limited to the screen size, so it thinks that it's not needed to scroll, as all items are visible. But they're not. I tried to add verticalAlignment: VerticalAlignment.Fill
and horizontalAlignment: HorizontalAlignment.Fill
to the ListView
, without any change. Any hint on how can I force the ListView
to fit on screen? Thanks.