Answer the question
In order to leave comments, you need to log in
How to write a game of life in QML?
I don’t know GUI in C ++ at all, so I decided to learn how to work with graphics in QML. There is a task, you need to have a field (how to make them? buttons next to it, a table somehow?) on it, after some time, the contents of these fields will change. Well, that is the classic game of "life". It was possible to make a terminal output, but only writing a graphical interface counts for the top five.
So here's how to create these fields in QML (to duplicate a lot of Rectangle with offsets, or somehow there is an output optimization through a loop, and what can you think of if you only write everything in a .qml file?), And how can these fields recognize the states of their neighbors? The state in the matrix (multidimensional array) is, of course, easy to track in a loop over i and j indices, but I'm not making a terminal conclusion. And I want to do all this through graphic fields (or buttons). In general, tell me where to dig? Thank you.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question