Answer the question
In order to leave comments, you need to log in
Placing a QWidget on a QGraphicsView - what's the difference between the 2 approaches?
Good afternoon!
I want to place scene controls on QGraphicsView. Like these
Controls should be stationary and not change scale when the view scale is changed.
Found 2 possible ways.
one.
QGraphicsView* view = new QGraphicsView;
MyWidget* mw = new MyWidget(view);
QGraphicsScene* scene = new QGraphicsScene;
MyWidget* mw = new MyWidget(view);
QGraphicsProxyWidget* proxy = scene->addWidget(mw);
proxy->setFlag(QGraphicsItem::ItemIgnoresTransformations);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question