I don't really see what the problem is with current design...
QGraphicsWidget *top = new QGraphicsWidget;
QGraphicsLinearLayout *l = new QGraphicsLinearLayout(top);
QGraphicsProxyWidget *w1 = new QGraphicsProxyWidget;
QGraphicsProxyWidget *w2 = new QGraphicsProxyWidget;
l->addItem(w1);
l->addItem(w2):
scene->addItem(top);
top->setGeometry(scene->sceneRect());
QGraphicsScene *scene = new QGraphicsScene(QRectF(0,0,1000,500));
QGraphicsWidget *top = new QGraphicsWidget;
QGraphicsLinearLayout *l = new QGraphicsLinearLayout(top);
QGraphicsProxyWidget *w1 = new QGraphicsProxyWidget;
w1->setWidget(new QPushButton);
QGraphicsProxyWidget *w2 = new QGraphicsProxyWidget;
w2->setWidget(new QPushButton);
l->addItem(w1);
l->addItem(w2):
scene->addItem(top);
top->setGeometry(scene->sceneRect());
To copy to clipboard, switch view to plain text mode
Bookmarks