PDA

View Full Version : paint solution



abu45
14th September 2010, 04:27
Can any one give me an advice how to build a program that will act like Microsoft Paint program. Like i will take value from mouse event and it will draw on a widget or other painting device. I can draw on a widget but when i repaint it it clears all previous drawing .What will be the benefit of using Qgraphicsview or item i also need to zoom it and give a X axis scale and Y axis scale view for help drawing.

This is urgent if anyone has any suggestion please tell me.
or give me some basic Code.

tbscope
14th September 2010, 05:35
http://doc.qt.nokia.com/4.6/examples-graphicsview.html

aamer4yu
14th September 2010, 09:18
I can draw on a widget but when i repaint it it clears all previous drawing
Can you elaborate ?

There can be solutions to store what you are drawing..

e8johan
14th September 2010, 09:49
Use a QImage on which you do the actual painting. That image can then be saved. Update the actual view (i.e. your widget) from the image.

Using the graphics view framework for a pixel based paint application is just wrong. That would be applicable is the question was how to build a vector drawing application.