Hey!
I have a list from C++ containing language code, language description and a flag for the corresponding country.
I made the connection to QML, but cant get to set the model right.
I tried different approaches and either I get an empty ComboBox, or I get a ComboBox containing only one alternative, which is “0”.
This is the code for the ComboBox:
ComboBox{
id: langSelection;
editable: false;
width: caText.width;
model: LanguageList.languageList;
textRole:{
if(LanguageList.langList.langCode !== undefined){
LanguageList.langList.langCode;
}
}
↧