mart added inline comments.
INLINE COMMENTS
> davidedmundson wrote in main.qml:60
> > ou can never be sure that the representation is "completed" as the model
> > can change at any moment?
>
> It must know internally as it has that separate populate and add transition.
>
> It shouldn't need an external signal. In a perfect world:
>
> ListView {
>
> model: someValidModel
> currentIndex: 4
>
> }
>
> should "just work"
ListView {
model: someValidModel
currentIndex: 4
}
annoyingly, you are right :p
this actually works, the problem was that i was loading the model too late,
after componentComplete.
now, loading the model in the ctor and just relying on one single binding for
currentIndex works perfectly.
note: i removed onCurrentIndexChanged: positionViewAtIndex as i want to put it
on the gridview kcm component itself, as i think it belongs there.
REPOSITORY
R119 Plasma Desktop
REVISION DETAIL
https://phabricator.kde.org/D12088
To: mart, #plasma, #vdg
Cc: davidedmundson, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai,
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart