pub trait QmlElement: QObjectHolder + Default {
const URI: &str;
const ELEMENT_NAME: &str;
const MINOR_VERSION: u8;
const MAJOR_VERSION: u8;
const IS_SINGLETON: bool;
// Provided methods
fn get_qmetatype() -> QMetaType { ... }
fn get_list_qmetatype() -> QMetaType { ... }
fn list_to_qvariant<Owner, Notify>(
owner: &Owner,
store: &Vec<Rc<RefCell<Self>>>,
_notify: Notify,
) -> QVariant
where Owner: QObjectHolder,
Notify: Fn(&mut Owner) + 'static { ... }
fn register() { ... }
}Required Associated Constants§
const URI: &str
const ELEMENT_NAME: &str
const MINOR_VERSION: u8
const MAJOR_VERSION: u8
const IS_SINGLETON: bool
Provided Methods§
Sourcefn get_qmetatype() -> QMetaType
fn get_qmetatype() -> QMetaType
Returns the QMetaType identifying this type, unique per concrete
type.
The #[qobject] macro overrides this with a per-type OnceLock body; the
default serves generic types and hand-written impls.
fn get_list_qmetatype() -> QMetaType
fn list_to_qvariant<Owner, Notify>(
owner: &Owner,
store: &Vec<Rc<RefCell<Self>>>,
_notify: Notify,
) -> QVariantwhere
Owner: QObjectHolder,
Notify: Fn(&mut Owner) + 'static,
fn register()
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.