I have connected QML's ListView to my C++ model and it updates when model changes which is cool. However I don't want to display my data in ListView bur rather in custom way in rectangle (ideally a plain view which doesn't exist).
How could I do this?
The issue I see obviously is rectangle
is not a view and there is other plain view which allows custom drawing. Is there way around it?
Addon
Following up on the answer and comment, let me give context why I am doing it. I have various information and if I use list, I will have to use multiple lists on one screen which doesn't look good. What I want to implement is what I would call 'document view'. Header goes here, title goes there, data here and footer here. It is a custom presentation of my model's data.
@Folibis, I like your first point. It seems like if do something like:
Rectangle
{
Text { text: mySingleton.getFruitName() }
Text { text: mySingleton.getFruitPrice() }
}
Note I have intentionally not included anchors or geometry to keep focus on my question but assume price appears next to fruit name.
Does this mean if I update fruit name or price of the exact same object in model else where in GUI, the above will be updated automatically?