I set the flag QGraphicsItem::ItemIgnoresTransformations and that keeps the widget from scaling when I scale the view but when I pan around the widget doesn't stay in view. If i set the widget's parent to the view then I can't rotate the widget. How can I keep the widget that I add to a scene from scaling and moving with the scene? Following is the code I am using to add the widget to the scene, I added a very large pixmap to the scene first so this is after that:
button->move( 300, 300 );
button->setFixedSize( 200, 200 );
QGraphicsProxyWidget *proxy = view.scene()->addWidget( button );
proxy
->setFlag
( QGraphicsItem::ItemIgnoresTransformations,
true );
proxy->rotate( 180 );
QPushButton *button = new QPushButton( "Hello World" );
button->move( 300, 300 );
button->setFixedSize( 200, 200 );
QGraphicsProxyWidget *proxy = view.scene()->addWidget( button );
proxy->setFlag( QGraphicsItem::ItemIgnoresTransformations, true );
proxy->rotate( 180 );
To copy to clipboard, switch view to plain text mode
Thanks,
Gabe
Bookmarks