Python: Add the ability to invoke functions declared in Slint from Python

This commit is contained in:
Simon Hausmann 2024-06-05 20:26:41 +02:00 committed by Simon Hausmann
parent 37b63e4bd4
commit b98035526b
5 changed files with 65 additions and 3 deletions

View file

@ -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