2

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;
}

I checked the "list all members" list, couldn't find it there: http://doc.qt.io/qt-5/qquickitem-members.html

Aquarius_Girl
  • 21,790
  • 65
  • 230
  • 411

1 Answers1

2

It is derived from the item's width and heght:

QRectF QQuickItem::boundingRect() const
{
    Q_D(const QQuickItem);
    return QRectF(0, 0, d->width, d->height);
}
dtech
  • 47,916
  • 17
  • 112
  • 190