A
A
Alexander2014-11-19 13:15:08
Qt
Alexander, 2014-11-19 13:15:08

How to display a list without scrolling in QML?

How can I display a list (ListView) without scrolling in cumle? In general, some analogue of ListView is needed, but scrolling was not provided there at all.
The situation is this: I'm loading a list with a sublist from a remote resource, the list should be scrollable, and the sublist should just be displayed inside this list (each list item on a new line). But if you use a ListView to display a sublist, then the main list becomes non-scrollable due to the fact that the scroll event is intercepted by the sublist. =(
a6129e85fd704ac4a9af12e3d33a0157.jpeg

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander, 2014-11-19
@wxmaper

ListView {
    ...
    ListView {
        interactive: false
    ...
    }
}

D
DancingOnWater, 2014-11-19
@DancingOnWater

In Qt, events are passed from parent to child. Therefore, the list cannot simply intercept the event. He receives it from the parent and informs him whether he captured the event or not. Further by default, if the event is captured, then we do nothing.
By default, any element only captures the event in the event. if it is in focus or events occur in its area.
If neither one nor the other is like, up to the code on the barrel.

Z
zsilas, 2014-11-27
@zsilas

Column {
        Repeater {
           ...
        }
    }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question