2
votes

I was writing some class, which extends QObject and has few Q_PROPERTY I`m use it in QAbstaction model with one Role (always return QObject* ), in QList; In QML I would to Bind property with TextEdit, like a :

Binding
{
    target :currentReport
    property: description
    value: text_description_edit.text
}

But this entry returns error and not bind my property:

file:///..somePath../ReportAddDelegate.qml:179: ReferenceError: Can't find variable: description

How I can edit my QObject property in qml?

UPD: im use property QtObject currentReport in delegate component

//sorry for my english

1
Show property description definition. It should have WRITE, READ and NOTIFY sections.Marek R
Yes, it have Q_PROPERTY(QString description WRITE setDescription READ getDescription NOTIFY descriptionChanged)Dcow
By the way, if I write like : TextEdit {... text: curretnReport.description } then I have no error, and I see text in TextEdit, but if I edit it, I don`t edit description property in objectDcow

1 Answers

1
votes

Solved! I'm take mistake in Binding ! need write property: "description" instead property: description