PDA

View Full Version : QLabel to QgraphicsView



2lights
20th August 2013, 15:21
I subclassed Qlabel
Painted image in label
User can create points, lines, etc in label (on image)

How do I save the image with the painted points/lines/etc in a variable (QImage, maybe)
& then Load the new edited version of the image into graphicsview

The user should not be aware of the change

Since the label is promoted (subclassed QLabel)
there are a alot of functionality i redefined so i do not want to reimplement all the functions
in graphics view... thats why only once the editing is completed do i want to load it into graphics view
(unless there is an easy way to move functions from QLabel to QGraphicsView, then i'll do everything in GraphicsView)

Direction on how to go about it...
#Saving image
#Clearing label
#Setting graphics view


Kind Regards

pkj
21st August 2013, 05:44
Create a wrapper around your widget with QGraphicsProxyWidget