listview

Get index of the delegate currently displayed - QML ListView

你。 提交于 2020-08-22 09:36:19
问题 I created a ListView, which displays a couple of pages of content defined by the user (plain text). The page displayed is a delegate. Only one page is visible at a time. I decided to use it to get snapping to one item, in the same way the iOS' launcher works. The user simply flicks between the pages. (this is to be used on touch screens) I need to have the index of the currently displayed page for some operation. currentIndex of the ListView always stays == 0. How can I get it? For those who

How to add Section footer, Section summary and Grand Total in ListView

我只是一个虾纸丫 提交于 2020-08-10 20:34:45
问题 Here's my ListView with section : ListView{ id: listView width: parent.width height: parent.height model: testContext.List interactive: false delegate: ItemDelegate { width: parent.width padding: 3 leftPadding: 15 rightPadding: scroll.width contentItem: RowLayout{ Text{ id: nameText text: modelData.name Layout.preferredWidth: (parent.width - scroll.width) / 3 } Text{ text: modelData.isActive Layout.preferredWidth: (parent.width - scroll.width) / 3 } Text{ text: modelData.age Layout

How to add Section footer, Section summary and Grand Total in ListView

折月煮酒 提交于 2020-08-10 20:33:27
问题 Here's my ListView with section : ListView{ id: listView width: parent.width height: parent.height model: testContext.List interactive: false delegate: ItemDelegate { width: parent.width padding: 3 leftPadding: 15 rightPadding: scroll.width contentItem: RowLayout{ Text{ id: nameText text: modelData.name Layout.preferredWidth: (parent.width - scroll.width) / 3 } Text{ text: modelData.isActive Layout.preferredWidth: (parent.width - scroll.width) / 3 } Text{ text: modelData.age Layout

How to add Section footer, Section summary and Grand Total in ListView

ぃ、小莉子 提交于 2020-08-10 20:31:34
问题 Here's my ListView with section : ListView{ id: listView width: parent.width height: parent.height model: testContext.List interactive: false delegate: ItemDelegate { width: parent.width padding: 3 leftPadding: 15 rightPadding: scroll.width contentItem: RowLayout{ Text{ id: nameText text: modelData.name Layout.preferredWidth: (parent.width - scroll.width) / 3 } Text{ text: modelData.isActive Layout.preferredWidth: (parent.width - scroll.width) / 3 } Text{ text: modelData.age Layout