Hi,
in my scene I use to have a lot of removable items, so most of times the scene is bigger than expected, way more sometimes.
I want to solve this by updating, by code, its size qhen the user presses a button.
I'm doing:
QRectF itemRec
= m_pSkScene
->itemsBoundingRect
();
m_pSkScene->setSceneRect(itemRec);
//m_pSkScene.views().at(0)->setSceneRect(itemRec);
ui.graphicsView->setSceneRect(itemRec);
QRectF itemRec = m_pSkScene->itemsBoundingRect();
m_pSkScene->setSceneRect(itemRec);
//m_pSkScene.views().at(0)->setSceneRect(itemRec);
ui.graphicsView->setSceneRect(itemRec);
To copy to clipboard, switch view to plain text mode
it resizes right, but when an item goes out the scroll bar doesn't appears as before. Setting "scrollBarAlwaysOn" doesn't solve it.
any idea? thanks!
Bookmarks