Hi Vladimir, 2010/12/15 user <[email protected]>: > I followed the guide here: > http://developer.qt.nokia.com/wiki/Selectable_list_of_Python_objects_in_QML to > create a QAbstractListModel. This model is then forwarded to QML. So my first > idea was to replace the model, but this resulted in a Python crash.
If it crashes, chances are that the version of PySide you are using is too old. Try to get the latest version from Git or the 1.0.0 beta1 release. The example works with that. If it still crashes with 1.0.0 beta1, please report it as a bug on http://bugs.openbossa.org/ in the PySide product. > I would try, if this method is fast enough or not but I don't know how to call > a function of a QML component from Python. I checked the pytoqml example > (http://qt.gitorious.org/pyside/pyside- > examples/trees/master/examples/declarative/signals/pytoqml1) but it only shows > how to call a function of the rootObejct. How do I call functions of other > objects? What exactly do you want to achieve? It might be better if your QML UI calls the Python code, and not the other way around (so that your code does not need to "know" about the internal structure of the UI - it results in cleaner code, but this might or might not be a target for your specific case). HTH. Thomas _______________________________________________ PySide mailing list [email protected] http://lists.openbossa.org/listinfo/pyside
