How do I draw interactive widgets such as QButtons and Line Edits over a QGraphicsView?
For ex, I have selected a region over an image in an image editing app which displays an image with QGraphicsView, and I want to annotate this region with a name.
So I want to have a Line edit and two buttons (Cross and Tick) below this rectangular selection.
How do I draw these?
Sample code would be cool!
QGraphicsScenehas a functionaddWidget()where you can add a widget to a scene. If you don’t want to go through the scene addWidget function you can create aQGraphicsProxyWidgetusesetWidget()and add the proxy widget to your scene.