Код: Выделить всё
class Cpp
{
...
Q_PROPERTY(... aProperty READ getAProperty
...
... getAProperty()
{
// which engine called me?..
}
};
// later
qmlRegisterType(...)
Код: Выделить всё
Cpp {
id: myCpp
}
Item {
... myCpp.aProperty // the syntax is not strict but you get the idea
}
Подробнее здесь: https://stackoverflow.com/questions/798 ... ype-object
Мобильная версия