Skip to content
Discussion options

You must be logged in to vote

I have made progress in this problem.

For a list of dicts as mentioned, you have to wrap every list in a slint.ListModel, like this:

        self._games = [slint.ListModel(
            [{"text": i["status"]}, {"text": i["game"]}, {"text": i["detail"]}]
        ) for i in games]
        self.games = slint.ListModel(self._games)

Then we can mutate self._games using the usual methods (like self._games[1].set_row_data(0, {"text": "✓"})) and then it will show up in the GUI as well.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by isoraqathedh
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant