Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
5.11.0, 5.11.1, 5.12.0, 5.12.1
Description
My Example is based on QQmlApplicationEngine, but is likely encounterable in other spaces too.
I'm trying to have a list of strings that is synced between QML and Python space.
If I use
QQmlApplicationEngine.rootContext().setContextProperty(name, prop)
with prop being a python List[str] (typing module notation) then any changes from QML do not reach python and any changes from Python do not reach QML.
The same happens with
QStringList is not available, so could not try.
Workarounds:
- QStringListModel.setStringList(List[str]) does trigger an update of the model to QML.
- from QML one can call Add and Remove functions on a bridging QObject