3 class BasicBlockWidget : public QGraphicsItem
11 _widget.addItem("THIS");
12 _widget.addItem("IS");
14 _widget.addItem("TEST");
15 _widget.resize(dx-20, dy-20);
18 QRectF boundingRect() const
21 return QRectF(x - penWidth / 2, y - penWidth / 2,
22 dx + penWidth, dy + penWidth);
25 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
28 painter->fillRect(x, y, dx, dy, QColor(0xcc, 0xcc, 0xff, 0xff));
29 painter->setPen(QColor(0x00, 0x00, 0xff, 0xff));
30 painter->drawRect(x, y, dx, dy);
31 painter->drawText(0, -5, "BLOCK");
32 _widget.render(painter);