class GroundScene: public QGraphicsScene {//...};//...class Block: public QWidget {//...};//.../*virtual*/ QGraphicsProxyWidget* GroundScene::addWidget(Block *widget) { widget->setAttribute(Qt::WA_NoSystemBackground); auto t = QGraphicsScene::addWidget(widget); t->setPalette(QColor(0, 0, 0, 0)); /// помеченная строка return t;}
painter.setBrush (QBrush (QColor (0, 0, 0, 0))); painter.drawRect (0, 0, width(), height());