I'd like to make a slot in my pyside code that accepts any arguments so I can 
call it in a variety of situations from QML. I was hoping that something like 
this would work:

Python:

  view.rootContext().setContextProperty('test', view)

  ...

  @Slot(object)
  def stuff(self, o):
    print o

QML:

  ...
  MouseArea
  {
    onClick:
    {
      test.stuff('hello')
      test.stuff([1,2,3])
    }
  }

Ideally, there would some sort of variable arguments I could use so that I 
could have 'def stuff(self, *args)' and call in QML 'test.stuff(1,2,3)'.

Any advice?


dan

----
Daniel Ashbrook, PhD
Senior Researcher, New Mobile Forms and Experiences
Nokia Research Center
Media Technologies Lab, Santa Monica
[email protected]





_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside

Reply via email to