Search code examples
c++qtqmlqt-quick

Edit QObject property from qml


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


Solution

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