Indalo
16th November 2009, 15:36
Hello!
If I place widgets in QGraphicsView, they don't fits its size:
// Add table in the scene
QGraphicsGridLayout *grid = new QGraphicsGridLayout();
grid->addItem(scene->addWidget(tableWidget), 0, 0);
QGraphicsProxyWidget* form = new QGraphicsProxyWidget;
form->setLayout(grid);
form->setCacheMode(QGraphicsItem::ItemCoordinateCache);
scene->addItem(form);
In the example above there is table in the scene, and if scene will be set to QGraphicsView, the table doesn't fit size according to the size of QGraphicsView.
That's the point. ^) Does anybody come across with such a problem?
Thanks.
If I place widgets in QGraphicsView, they don't fits its size:
// Add table in the scene
QGraphicsGridLayout *grid = new QGraphicsGridLayout();
grid->addItem(scene->addWidget(tableWidget), 0, 0);
QGraphicsProxyWidget* form = new QGraphicsProxyWidget;
form->setLayout(grid);
form->setCacheMode(QGraphicsItem::ItemCoordinateCache);
scene->addItem(form);
In the example above there is table in the scene, and if scene will be set to QGraphicsView, the table doesn't fit size according to the size of QGraphicsView.
That's the point. ^) Does anybody come across with such a problem?
Thanks.