A
A
Alexander2014-12-14 11:34:11
Qt
Alexander, 2014-12-14 11:34:11

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

3 answer(s)
A
Alexander, 2014-12-15
@wxmaper

Issue solution: www.cyberforum.ru/qt/thread1328440.html

A
Armenian Radio, 2014-12-14
@gbg

Maybe instead of QML use QGraphicsView or even QGLWidget?

X
Xano, 2014-12-15
@Xano

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 question

Ask a Question

731 491 924 answers to any question