PDA

View Full Version : Direct call to QAbstractListModel item Q_INVOKABLE from qml



matsukan
11th December 2012, 21:35
I do have QAbstractListModel which contains object which has derived QObject. It has one INVOKABLE method which I would like call from QML side. How I do that ?

Like:

function makeTest ()
{
list.model(list.currentIndex).doINVOKABLE();
}

Why this isn't work ?

wysota
11th December 2012, 21:47
The code you have tries to call doINVOKABLE() on the MODEL not on its element.

matsukan
12th December 2012, 07:48
Ok, how to call doINVOKABLE() of specific element?