mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-03 18:29:09 +00:00
Python: Create a property type wrapper for component instances
Map properties and callbacks to attributes with getters and setters. cc #4134
This commit is contained in:
parent
6d2144deb1
commit
3c9b57ecf8
4 changed files with 130 additions and 6 deletions
|
@ -166,6 +166,6 @@ if __name__ == "__main__":
|
|||
module = slint.load_file(
|
||||
"../../examples/printerdemo/ui/printerdemo.slint")
|
||||
instance = module.MainWindow()
|
||||
instance.set_global_callback(
|
||||
"PrinterQueue", "start-job", lambda title: print(f"new print job {title}"))
|
||||
instance.PrinterQueue.start_job = lambda title: print(
|
||||
f"new print job {title}")
|
||||
instance.run()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue