On Thursday 09 December 2010 17:07:45 Jukka Välimaa wrote:
> Hi Renato,
> 
> Here's a complete example. I run the file containing this, and the only
> message printed is the error I wrote about above; the method is never
> called. If I use int in the test method, everything works fine.
> 
> ---------------------------------------------------------------------------
> ----------- from PySide import QtCore
> from PySide.QtGui import QApplication
> from PySide.QtScript import QScriptEngine, QScriptValue
> 
> app = QApplication([])
> 
> class Test(QtCore.QObject):
>     @QtCore.Slot(list)
>     def test(self, param):
>         print 'test method called, param is', type(param), param
> 
> engine = QScriptEngine()
> test = Test()
> test_qobject = engine.newQObject(test)
> engine.globalObject().setProperty('test', test_qobject)
> 
> val = engine.evaluate("test.test([1, 2, 3])")
> print val.toString()
> ---------------------------------------------------------------------------
> ------------------

This works in C++? I mean, with the slot signature "Test::test(const 
QList<int>& list);"
 
> --Jukka
> 

-- 
Hugo Parente Lima
INdT - Instituto Nokia de Tecnologia

Attachment: signature.asc
Description: This is a digitally signed message part.

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

Reply via email to