Struct qml::QListModel [] [src]

pub struct QListModel<'a> {
    // some fields omitted
}

Allows providing a custom model to QML

Methods

impl<'a> QListModel<'a>
[src]

fn new<'b>(rolenames: &'b [&'a str]) -> Box<Self>

Rolenames are roles of provided data, that are mapped to corresponding roles in QML.

fn row_count(&self) -> usize

Returns an amount of rows in this model

fn get_qvar(&self) -> QVariant

Gets a QVariant associate

fn insert_row<T>(&mut self, qvars: T) where T: Iterator<Item=QVariant>

Inserts a row into model

Note that it clones all incoming qvariants as modifying them is not allowed.