Hello,

Perhaps the Connections Element is what you require here?

http://doc.qt.nokia.com/4.7-snapshot/qml-connections.html

Mark T

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf
Of Ivailo Iliev
Sent: 18 January 2011 11:29
To: [email protected]
Subject: [Qt-qml] how I can access signals signals of the aliased
properties

Hi all,

I'm having case like this

ItemA {
     property variant myProperty
}

ItemB {
     property alias myAlias: test.myProperty
     ItemA{ id: test }
}

And it seems that onMyAliasChanged is never fired - I need to listen to 
onMyPropertyChanged directly. But in my case I want to "hide" ItemA and 
just expose this property.

Am I doing something wrong or there is another way to do it?

The only thing I can think of for now is:

ItemB {
     property alias myAlias: test.myProperty
     signal MyAliasHasChanged()
     ItemA
         id: test
         onMyPropertyChanged: {
             MyAliasHasChanged()
         }
     }
}

but it seems a little bit ugly and I need to use connect not only one 
alias - and it's a lot of "bogus" coding.

Thanks in advance for the help,
Ivo
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply via email to