Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

Your Answer


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.