[SailfishDevel] SilicaListView inside a Column and SilicaFlickable

Krisztian Olah fasza2mobile at gmail.com
Sat May 10 13:11:19 UTC 2014


Hi everyone, I found this snippet in the Qt Devdays Beiing document(p16), I
want to do something similar; Having a SilicaListView in a Column which in
return is in a SilicaFlickable.

SilicaFlickable {
    PullDownMenu { ... }
    Column {
        SlideshowView {
            model: monthModel
            delegate: DateGrid { ... }
            ...
        }
        SilicaListView {
            model: agendaModel
            delegate: EventItem { ... }
            ...
        }
    }
}

The problem is, that in Column top and bottom anchor doesn't work, my list
items show up on the  top of the page stacked on top of each other
(pesumably, because just one item is visible). If I move my SilicaListView
outside Column then it kind of works, provided I anchor top to
column.bottom and bottom to parent.bottom(though I get a binding loop with
flick.contentHeight). The thing is I don't want SilicaListView to be
interactive I want only SilicaFlickable to be scrollable and I want it to
scroll to the bottom of listview.
   If I needed to know listview's contentHeight, provided top and bottom
aren't anchored then listview.height or listview.contentHeight won't give
the right answer, am I correct? Is the correct way to get contentHeight:
   cHeight = children.height + spacing*count
?


SilicaFlickable {
    id: flick
    ...
    Column {
        id: column
        ...
        SilicaListView {
            id: listview
            spacing: 10
            interactive: false
            ...
        }
    }
}

Any help would be much appreciated,
Thanks in advance
Kris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140510/9c0260bb/attachment.html>


More information about the Devel mailing list