mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-22 00:02:40 +00:00
Add support for timers and run/quit_event_loop
This commit is contained in:
parent
ebaecbcb7e
commit
33a1d07226
5 changed files with 148 additions and 1 deletions
|
@ -45,6 +45,20 @@ impl From<slint_interpreter::PlatformError> for PyPlatformError {
|
|||
}
|
||||
}
|
||||
|
||||
pub struct PyEventLoopError(pub slint_interpreter::EventLoopError);
|
||||
|
||||
impl From<PyEventLoopError> for PyErr {
|
||||
fn from(err: PyEventLoopError) -> Self {
|
||||
pyo3::exceptions::PyRuntimeError::new_err(err.0.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<slint_interpreter::EventLoopError> for PyEventLoopError {
|
||||
fn from(err: slint_interpreter::EventLoopError) -> Self {
|
||||
Self(err)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PyInvokeError(pub slint_interpreter::InvokeError);
|
||||
|
||||
impl From<PyInvokeError> for PyErr {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue