Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm writing a small game and in the settings it uses a ListItem.ValueSelector in the settings, i'd like to if it's possible attach some event on it like with a mouse area, ie:

MouseArea {
anchors.fill: parent
onClicked: {
    //do something when clicked 
    }
}

an event that triggers when the selectedIndex: property in changes a ListItem.ValueSelector, any help?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

In QML, any property defined should produce a corresponding on<Property>Changed callback. Keeping in mind that it will capitalize the first letter of the property, a selectedIndex property should provide an onSelectedIndexChanged callback.

share|improve this answer
    
It worked, thanks for the info... –  Hairo Mar 31 '13 at 2:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.