PDA

View Full Version : Eraser like MS Paint in Qt



dropper
30th October 2012, 15:08
I have trouble in programming a module like eraser in MS Paint. I have just learned and find it difficult in getting mouse position and make the cursor become a square or circle when user click the Button Eraser.

Can I open an image in a widget and erase it? or I need to use something else to do this? Thanks a lot!

Santosh Reddy
30th October 2012, 19:32
Can I open an image in a widget and erase it? or I need to use something else to do this?
This will need understanding of mouse (events in general) and painting systems in Qt.

As a matter of fact it is possible with QWidgets, it will lot more simpler to do with QGraphicsView & QGraphicsScene (Graphics View Framework)