Re: [Interest] Modify object list in qml

2017-11-29 Thread Oleg Evseev
Nice. Thanks Jérôme! 2017-11-29 23:00 GMT+03:00 Jérôme Godbout : > model: (myCondition ? [0] : []).concat(DB.getList()) > > Take care: > DB.getList().concat([...]) > will not work you would need to convert the QList to JS array first > > [image: bodycad] > Jerome Godbou

Re: [Interest] Modify object list in qml

2017-11-29 Thread Jérôme Godbout
model: (myCondition ? [0] : []).concat(DB.getList()) Take care: DB.getList().concat([...]) will not work you would need to convert the QList to JS array first [image: bodycad] Jerome Godbout Software Developer 2035 rue du Haut-Bord, Québec, QC, Canada. G1N 4R7 T: +1 41

[Interest] Modify object list in qml

2017-11-29 Thread Oleg Evseev
Hi all, I would like to push an empty object in front of objects list model of ComboBox. I can do this in c++: QList SomeClass::getList() { QList list = db.getList(); list.push_front(Q_NULLPTR); return list; } then set it as model for ComboBox: model: SomeClass.getList() And it