mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-16 14:15:57 -06:00
[GH-ISSUE #59] Returning a List<Type> from a Model #28
Labels
No labels
bug
enhancement
help wanted
help wanted
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/qmlnet#28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MaxMommersteeg on GitHub (Aug 13, 2018).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/59
I'm trying to build a small application that displays todo items in a qml view. To do this I want to return a
List<TodoItem>from my model.Problem
I'm not able to iterate over the list using a for-loop.
console.log()displays the following value:List`1(0x1c071c50b30).I'm also not able to iterate over the list.
Model
QML
Not sure if this isn't supported yet or something that I'm doing incorrectly.
@pauldotknopf commented on GitHub (Aug 14, 2018):
Yeah, this is a sore point at the moment. This is the next thing I'll be working on (#55).
Until then, create a method on your model to get an item from a list at an index.
@MaxMommersteeg commented on GitHub (Aug 14, 2018):
Alright, thanks for your explanation. Perhaps we can add some context of this issue to issue https://github.com/pauldotknopf/Qml.Net/issues/55?
@pauldotknopf commented on GitHub (Aug 15, 2018):
There is a lot of moving parts to that issue, and I haven't had time to fully suss out the reqs.
I've been looking at it now, and I think the first thing to address is #31. I will likely have this done by this weekend.
@pauldotknopf commented on GitHub (Aug 19, 2018):
This feature is completed.
See this commit for an example:
551dd105c8