- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
- QWidget *widget) {
- painter->fillRect(x, y, dx, dy, QColor(0xcc, 0xcc, 0xff, 0xff));
- painter->setPen(QColor(0x00, 0x00, 0xff, 0xff));
- painter->drawRect(x, y, dx, dy);
- painter->drawText(0, -5, name);
- _widget.render(painter);
- }
+ const QColor defaultColor = QColor(0xcc, 0xcc, 0xff, 0xff);
+ const QColor highlightColor = QColor(0xff, 0x99, 0xff, 0xff);