javascript - How to get base class of item in QML? -



javascript - How to get base class of item in QML? -

is there way item class in qml? know objectname , id etc. looks bit unusual , not comfortable. need:

class="lang-js prettyprint-override">combobox { id: combobox } textfield { id: textfield } function getvalue(item) { switch(item.???) { //what property can utilize here? case 'combobox': homecoming item.model.get(item.currentindex).value; case 'textfield': homecoming item.text; } }

using objectname described in lots of articles on net might ambiguous , excessive, example:

class="lang-js prettyprint-override">combobox { id: combobox objectname: "combobox" } textfield { id: textfield objectname: "combobox" /// oops!! } function getvalue(item) { switch(item.objectname) { case 'combobox': homecoming item.model.get(item.currentindex).value; case 'textfield': homecoming item.text; } }

no, can done c++.

javascript qt qml qtquick2

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -