I created a character inventory using a listview. Each object has a widget attached to it, and the objects themselves are stored in an array variable. The problem is that if I change the value variable in an object (the number of items, for example), the widget doesn’t reflect it. It still shows 0 items. Although the meaning in the object itself has already changed.
I found a solution to the problem. I passed data to a structure in the object. And I changed a separate variable during the game.


