[Interest] QML Set data from a different model role

NoRulez norulez at me.com
Mon May 9 08:19:24 CEST 2016


Hi,

I want do show data in a combobox in QML and after a selection in the combo box is made I want the data but from a different role.

In QML I have the following:

ComboBox {
model: MyModel
textRole: "Role1"
onCurrentTextChanged: {
        MyLineEdit.text = ?????? // Here I want the text from "Role2"
    }
}

MyLineEdit is a QML LineEdit
The text for "Role1" works already.
Could anybody please give me a help

Thanks


More information about the Interest mailing list