fn from_qvariant(mut variant: QVariant) -> Option<Self> {
        let id: i32 = Self::id();
        let var_ptr = &mut variant as *mut QVariant;
        let ptr = cpp!(unsafe [
            var_ptr as "QVariant *",
            id as "int"
        ] -> *const c_void as "const void *" {
            return var_ptr->canConvert(id) && var_ptr->convert(id)
                ? var_ptr->constData()
                : nullptr;
        });
        if ptr.is_null() {
            None
        } else {
            Some(unsafe { &*(ptr as *const Self) }.clone())
        }
    }
/// Attempt to convert from a QVariant to this type.
Attempt to convert from a QVariant to this type.
Attempt to convert from a QVariant to this type .
fn from_qvariant(mut variant: QVariant) -> Option<Self> {
        let id: i32 = Self::id();
        let var_ptr = &mut variant as *mut QVariant;
        let ptr = cpp!(unsafe [
            var_ptr as "QVariant *",
            id as "int"
        ] -> *const c_void as "const void *" {
            return var_ptr->canConvert(id) && var_ptr->convert(id)
                ? var_ptr->constData()
                : nullptr;
        });
        if ptr.is_null() {
            None
        } else {
            Some(unsafe { &*(ptr as *const Self) }.clone())
        }
    }
fn from_qvariant ( mut variant : QVariant ) -> Option < Self > { let id : i32 = Self :: id ( ) ; let var_ptr = & mut variant as * mut QVariant ; let ptr = cpp ! ( unsafe [ var_ptr as " " id as " " ] const c_void as " " { return var_ptr canConvert ( id ) var_ptr convert ( id ) var_ptr constData ( ) nullptr } ) ; if ptr . is_null ( ) { None } else { Some ( unsafe { & * ( ptr as * const Self ) } . clone ( ) ) } }
Attempt to convert from a QVariant to this type.
Attempt to convert from a QVariant to this type .
variant
QVariant