PDA

View Full Version : how to Draw Line In Graphic View?



M4RZB4Ni
2nd June 2016, 05:49
Hello,
i have a GraphicView in my application that this graphicview have a picture
and i want to draw line on the picture and erase the line,or reload pic to erase lines
i read The QgraphicView & Qpaint Class Documentation But i dont know how
i do must that!
What i must do?
Can any buddy Write a simple and sample code for me?
Thanks

arunpk
2nd June 2016, 08:37
Checkout the "Diagramscene" example available in Qt. This example shows how to draw a line using mouse.

M4RZB4Ni
2nd June 2016, 11:00
Thanks but That Example do not tech how to draw line
just show how to draw shape!

arunpk
3rd June 2016, 07:59
Try this.. http://www.walletfox.com/course/qgraphicsitemruntimedrawing.php