Thanks Kent, You were right on both counts. I don't need a QScriptValue and the value is not sent from qml for some reason. I will investigate further.
BR. Cristian Stamateanu On Tue, 29 Jun 2010 18:39:36 +0300, Kent Hansen <kent.han...@nokia.com> wrote: > Hi, > > On 29. juni 2010 16:58, ext Cristian Daniel Stamateanu wrote: >> Hello, >> >> I have the following problem : I have a class declaring the following >> slot: >> >> void RssFeedManager::addFeedEx(const QScriptValue& name,const >> QScriptValue& address ) >> { >> bool nameIsString = name.isVariant(); >> QString str = name.toString(); >> ... >> } >> >> and I am calling this slot from QML >> >> This works ok: >> feedManager.addFeedEx( "whatever", addFeedView.address ); >> >> while using a binding to a property declared in addFeedView like >> property string name; >> >> feedManager.addFeedEx( addFeedView.name, addFeedView.address ); >> >> is not working. >> In the c++ side I am getting a string only it is an empty one. >> >> Any thoughts? >> > > Have you checked that the name is indeed non-empty on the JS side? > Does it work if you declare the slot as taking a QString argument (why > do want to receive it as a QScriptValue)? > What type is the script value, is it an object? If so, does > QScriptValue::toVariant() return anything? QML has a special "hook" to > allow converting a script value to a variant, but no hook for the > toString case AFAICT. > > Regards, > Kent > _______________________________________________ > Qt-qml mailing list > Qt-qml@trolltech.com > http://lists.trolltech.com/mailman/listinfo/qt-qml -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ _______________________________________________ Qt-qml mailing list Qt-qml@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-qml