Answer the question
In order to leave comments, you need to log in
How to organize removal of hidden components in Qt QML?
Guys, help me with this question: I'm creating a large grid, say, 200x200 using the Column{} + Row{} components.
The element of each grid is Rectangle { ... Image { ... } }. The whole thing is tucked into Flickable{} so you can move it around. When downloading the application eats up almost 500MB of RAM! Obviously I'm not creating the "model" of the grid correctly. You need to somehow automatically remove or hide invisible objects, that is, those that have gone beyond the boundaries of Flickable{}, as, for example, ListView{} does. How to do it?
Adding the property clip: true to Flickable{} didn't help
update
Looked at GridView{} - it's almost there, but it can only scroll the table either vertically or horizontally :-/
Answer the question
In order to leave comments, you need to log in
Honestly, I'm not sure about the latest achievements of Qt-builders, maybe such functionality has already been implemented. At one time, I wrote a bicycle with an assessment of the visibility zone and dynamic loading of visible components (with a forward / backward margin of N screens, usually N = 1 was enough) and, accordingly, dynamic unloading of all other components.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question