Obsolete Members for UbuntuListView

The following members of QML type UbuntuListView are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

Properties

Property Documentation

[read-only] pullToRefresh : pullToRefresh

Attached PullToRefresh to control manual model refresh. The component is disabled by default.

import QtQuick 2.4
import QtQuick.XmlListModel 2.0
import Ubuntu.Components 1.3

UbuntuListView {
    width: units.gu(40)
    height: units.gu(71)
    model: XmlListModel {
        source: "http://feeds.reuters.com/reuters/topNews"
        query: "/rss/channel/item"
        XmlRole { name: "title"; query: "title/string()" }
    }
    // let refresh control know when the refresh gets completed
    pullToRefresh {
        enabled: true
        refreshing: model.status === XmlListModel.Loading
        onRefresh: model.reload()
    }
    delegate: ListItem {
        ListItemLayout {
            title.text: modelData
        }
        onClicked: {
            ListView.view.model.reload();
        }
    }
}

This property was introduced in Ubuntu.Components 1.1.