Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Setting property based on role

$
0
0
By QObjectList you mean QList<QObject*> exposed to QML? If so, then you need you need to have something like this in class you use in your list: Class Ajax: public QObject{     Q_OBJECT     Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY propertyChanged)    public:        ....        QString property() const; void setProperty(QString const &value);     signal:          propertyChanged } And than in QML you should be able to do: onAccepted: { myModel[rowIndex].property=value }

Viewing all articles
Browse latest Browse all 4972

Trending Articles