mirror of
https://github.com/slint-ui/slint.git
synced 2025-07-16 09:35:21 +00:00
Python: Don't panic when unable to convert an interpreter data type to Python
Print a warning and return None instead
This commit is contained in:
parent
b075fa8acd
commit
b87cd69f47
1 changed files with 4 additions and 1 deletions
|
@ -49,7 +49,10 @@ impl<'a> ToPyObject for PyValueRef<'a> {
|
|||
slint_interpreter::Value::Brush(brush) => {
|
||||
crate::brush::PyBrush::from(brush.clone()).into_py(py)
|
||||
}
|
||||
_ => todo!(),
|
||||
v @ _ => {
|
||||
eprintln!("Python: conversion from slint to python needed for {:#?} and not implemented yet", v);
|
||||
().into_py(py)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue