On Monday 20 December 2010 13:32:41 Vladimír Jícha wrote: > Hi List, > > It's me again with some QML related questions. I'm trying to call a > function in my Python code from QML UI. I followed the example called > "qmltopy2". It works OK. But I wanted more functions with the same input > parameters. I thought I only need to write a new function and then call > it from QML. But apparently this doesn't work. Please see my modified > version of the qmltopy2 example. > > Is this a bug or is the behavior intended? If it's intended, how to do > it right?
val2() *must* be declared as a slot to be visible on QML. > And talking aout calling Python functions from QML, what about the other > way - calling a QML (JavaScript) funcion from Python? I studied the > pytoqml1 eample. It shows how to call a function of QML root object. How > do I call functions of other objects? You do it the same way you do to call javascript functions from C++. > Thank you, > Vladimir -- Hugo Parente Lima INdT - Instituto Nokia de Tecnologia
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ PySide mailing list [email protected] http://lists.openbossa.org/listinfo/pyside
