Dynamically create Rectangles grid for Maze-like structure
-
Hi,
I would like to create maze like structure in QML. As C++ side perform generation I would like to also create QML visual object in C++.
Most of examples relies on using QML files with single elements (link) - building whole grid with it sound doable.
Then I need to add walls, not all fields are drawn (so not full rectangular grid), parent/child hierarchy, objects lifetime, etc.
Is it reasonable and feasible? What are solutions for dynamically generated content in QML?PS: What came to my mind - as a possible solution - is to use QAbstractTableModel and put all work on delegates. Drawing rectangle, walls, doors, creatures, loot, etc.