QML - reload Repeater data?
-
Hello,
How can i reload Repeater data ??
i try something like this (repeater.update()) but nothing happen
Repeater{
id: repeater
}Or how can i reload all data in Repeater???
-
@007fred50 You could try something like:
- If you are using a ListModel, clear() it and re-add() the elements
- If you are using other type of model, try to id-of-theRepeater
.model = []orundefined(can't remember now which one), and then redefine it
-
@CiberSheep Hello,
How can i create an Message chat app with ListModel
I use this here:
Repeater { id: idrepeater model: checkleftright.length Rectangle{ width: parent.width height: 50 color: "grey" Rectangle{ x: setchat(parent.width,index) width: parent.width / 2 //height: 100 color: "red" //radius: 15 Text{ width: parent.width height: parent.height text: chatmessages[index+1] wrapMode: Text.WordWrap } } } }this is dynamic on page load.
-
Maybe you can take a look at Fluffy Chat
https://gitlab.com/ChristianPauly/fluffychat/ -
@007fred50 Have you read some documentations about the Model View Delegate in QML ?.
I can suggest https://qmlbook.github.io/ or the general Qt QML documentation
[link text](link url)And yes best is to find examples. What does not work with yoyr. example ?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login