mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-02 21:03:00 +00:00
Python: Add the ability to invoke functions declared in Slint from Python
This commit is contained in:
parent
37b63e4bd4
commit
b98035526b
5 changed files with 65 additions and 3 deletions
|
|
@ -35,8 +35,12 @@ def test_load_file_wrapper():
|
|||
instance.say_hello = lambda x: "from here: " + x
|
||||
assert instance.say_hello("wohoo") == "from here: wohoo"
|
||||
|
||||
assert instance.plus_one(42) == 43
|
||||
|
||||
assert instance.MyGlobal.global_prop == "This is global"
|
||||
|
||||
assert instance.MyGlobal.minus_one(100) == 99
|
||||
|
||||
del instance
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue