Create a circle with mouse event and get back data of points in a file
My question is, how to create a circle in this way: on my interface, I have a button, and a QGraphicsView with a picture on it, when I click on the button, I would like to have a point which is the center of the picture to appear and when I move the mouse a line representing the radius is visible too and varying when I move the mouse. When I click with the left button of the mouse, it creates the circle and I get back a vector of points of this circle that I store in a datafile where I define in the code the number of points (a value that the user can't choose with the interface).
My question about this is, is it possible to do this? I had some pre-works on visual studio to plot a contour (when I click on the left button it creates point and the second time a line between the two points) but there was a problem at the end about a file i needed that make me change my works with a circle but it seems more complicated with Qt to realize it.
Thank you in advance for your reading and for your reponse.