From 758cec1a767c056aaf9da36fd411cdf4a8fba32e Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Tue, 14 Aug 2012 00:11:51 +0200 Subject: rewrite live notifications handling using models --- metawatch/qml/com/javispedro/sowatch/metawatch/MWListView.qml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'metawatch/qml') diff --git a/metawatch/qml/com/javispedro/sowatch/metawatch/MWListView.qml b/metawatch/qml/com/javispedro/sowatch/metawatch/MWListView.qml index 6af7b18..e16869f 100644 --- a/metawatch/qml/com/javispedro/sowatch/metawatch/MWListView.qml +++ b/metawatch/qml/com/javispedro/sowatch/metawatch/MWListView.qml @@ -67,6 +67,17 @@ ListView { } } + function scrollTop() { + if (count == 0) { + return; + } + if (selectable) { + currentIndex = 0; + } + positionViewAtIndex(0, ListView.Beginning); + + } + Rectangle { id: indicatorCont visible: list.indicator && (list.contentHeight > list.height) -- cgit v1.2.3