Reputation: 854
I want to ask a question about can I resize QGraphicsItem without creating a class that inherits QGraphicsItem. For example, something like this:
void MyScene::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
point = event->scenePos();
if( ArrowCursor )
{
curItem = this->itemAt( point, view->transform() );
if( curItem && !curItem->isSelected() )
{
curItem->update( 10,10, 100, 100 );
}
}
}
Upvotes: 1
Views: 139
Reputation: 38092
curItem->setTransform(QTransform::fromScale(2.0,2.0), true);
Offtopic: This is strange that you are doing this by subclassing QGraphicsScene
.
Upvotes: 1