http://doc.qt.io/qt-5/qquickitem.html
QSGNode *MyItem::updatePaintNode(QSGNode *node, UpdatePaintNodeData *)
{
QSGSimpleRectNode *n = static_cast<QSGSimpleRectNode *>(node);
if (!n) {
n = new QSGSimpleRectNode();
n->setColor(Qt::red);
}
n->setRect(boundingRect());
return n;
}
我检查了“列出所有成员”列表,在那里找不到: http: //doc.qt.io/qt-5/qquickitem-members.html