how to save a image ( like flow chart ) draw in QGraphicScene example of Qt4.7 (diagramscene) so it can be redraw next time, after rerunning the program, or can be used in other program.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming you don’t just want a raster save of the scene to a png.
Normally you would want the objects on the scene to have their own save and restore function that would save the properties of the object. You could do this by serialising the objects to a QDataStream and then storing that QDataStream in a file for loading back in.
For example where Polygon is my own class:
If you did just want a png or a jpeg then its simple: