pub trait QAbstractItemModel: QObjectHolder<ProxyRust = QAbstractItemModelProxyRust> {
// Required methods
fn index(&self, row: i32, column: i32, parent: &QModelIndex) -> QModelIndex;
fn parent(&self, child: &QModelIndex) -> QModelIndex;
fn row_count(&self, parent: &QModelIndex) -> i32;
fn column_count(&self, parent: &QModelIndex) -> i32;
fn data(&self, index: &QModelIndex, role: i32) -> QVariant;
// Provided methods
fn role_names(&self) -> QHash<i32, QByteArray> { ... }
fn set_data(
&mut self,
index: &QModelIndex,
value: &QVariant,
role: i32,
) -> bool { ... }
fn remove_rows(
&mut self,
first: i32,
count: i32,
parent: &QModelIndex,
) -> bool { ... }
fn sibling(&self, row: i32, column: i32, idx: &QModelIndex) -> QModelIndex { ... }
}Required Methods§
fn index(&self, row: i32, column: i32, parent: &QModelIndex) -> QModelIndex
fn parent(&self, child: &QModelIndex) -> QModelIndex
fn row_count(&self, parent: &QModelIndex) -> i32
fn column_count(&self, parent: &QModelIndex) -> i32
fn data(&self, index: &QModelIndex, role: i32) -> QVariant
Provided Methods§
fn role_names(&self) -> QHash<i32, QByteArray>
fn set_data(&mut self, index: &QModelIndex, value: &QVariant, role: i32) -> bool
fn remove_rows(&mut self, first: i32, count: i32, parent: &QModelIndex) -> bool
fn sibling(&self, row: i32, column: i32, idx: &QModelIndex) -> QModelIndex
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.