Trait qmetaobject::listmodel::SimpleListItem
source · pub trait SimpleListItem {
// Required methods
fn get(&self, role: i32) -> QVariant;
fn names() -> Vec<QByteArray>;
}
Expand description
A trait used in SimpleListModel.
Can be derived with #[derive(SimpleListModel)]
, in which case all the member of the struct
get exposed. The public member needs to implement the QMetaType trait
Required Methods§
sourcefn get(&self, role: i32) -> QVariant
fn get(&self, role: i32) -> QVariant
Get the item in for the given role. Note that the role is, in a way, an index in the names() array.
sourcefn names() -> Vec<QByteArray>
fn names() -> Vec<QByteArray>
Array of the role names.
Object Safety§
This trait is not object safe.