[Qt-qml] Calling slots with binding

2010-06-29 Thread Cristian Daniel Stamateanu
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

Re: [Qt-qml] Calling slots with binding

2010-06-29 Thread Kent Hansen
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.isVarian

Re: [Qt-qml] Calling slots with binding

2010-06-30 Thread Cristian Daniel Stamateanu
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 wrote: > Hi, > > On 29. juni 2010 16:58, ext Cristian Daniel Stam

Re: [Qt-qml] Calling slots with binding

2010-06-30 Thread Cristian Daniel Stamateanu
Ok, here is what I found, it seems that using bindings in QML, values are transfered to child components but when changed inside child the value is not sent back to the parent: //Parent.qml Rectangle{ property string title: "initial value" id: root Child{

Re: [Qt-qml] Calling slots with binding

2010-06-30 Thread aaron.kennedy
Hi, Bindings are intentionally unidirectional. As a binding can be a complex expression there is no way for us to automatically reverse it. In the specific case you describe you could us a property alias. Rectangle { property alias title: myChild.title Child { id: myChild

Re: [Qt-qml] Calling slots with binding

2010-06-30 Thread Cristian Daniel Stamateanu
Thanks Aaron, it works with property alias. aaron.kenn...@nokia.com wrote: > Hi, > > Bindings are intentionally unidirectional. As a binding can be a complex > expression there is no way for us to automatically reverse it. > > In the specific case you describe you could us a property alias.