Files
slint/api/python
Simon Hausmann 2f313f84ec Python: Initial support for implementing models in Python
This provides a Model base class in Python and sub-classes of that
can be set as data models in slint.

The ListModel is provided as basic sub-class operating on a list() and
allowing mutation and notifying the view on the Slint side.

Similarly, an array declared in Slint is exposed as an object to Python
that looks like a Model.

Both support the sequence protocol.

Fixes #4135
2024-03-05 15:45:52 +01:00
..
2024-02-20 17:33:11 +00:00
2024-01-31 17:04:06 +01:00

Slint-python (Alpha)

Slint is a UI toolkit that supports different programming languages. Slint-python is the integration with Python.

Warning: Alpha Slint-python is still in the very early stages of development: APIs will change and important features are still being developed, the project is overall incomplete.

You can track the overall progress for the Python integration in GitHub at https://github.com/slint-ui/slint/milestone/18 as well as by looking at python-labelled issues at https://github.com/slint-ui/slint/labels/a%3Alanguage-python .

If you want to just play with this, you can try running one of our test cases in a virtual environment:

cd api/python
python -m venv .env
source .env/bin/activate
pip install maturin
maturin develop
python ./tests/test_instance.py

This will bring up the printer demo and a Python callback is invoked when starting a new print job.