Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

Convert listelement role to string

$
0
0
Hello all.Can someone show me how to convert listelement role to to string.I post the example i use to get the string but only the first listelement is succesful.The rest not. Model.qml ListModel {     id: model         ListElement{names: "354873595" }         ListElement{names: "354700672" }         ListElement{names: "359033560" }         ListElement{names: "354875672" }         ListElement{names: "352500609" } } MainPage.qml function match() {         if (topname.text == somename.text)             testdialog.open()         else {             faildialog.open()         }     }     Model {             id: namemodel         }         Text {             id: topname             visible: false             text: "2671634"         }         Text {             id: somename             visible: false             text: names         } I try to use “namemodel.get(0).name” but only the first is read while the rest is not read.

Viewing all articles
Browse latest Browse all 13965

Trending Articles