If you want to use graphics view, you don't need to reimplement the paint event. Instead you have to add items to the scene. If you wish to use my approach, you can use the above code, just transform it so that it uses integer values.
If you want to use graphics view, you don't need to reimplement the paint event. Instead you have to add items to the scene. If you wish to use my approach, you can use the above code, just transform it so that it uses integer values.
yes wysota , i am following u r method ,i made the chage u said(changing to int values)
inspite ,of the change i am not getting any output .
my problem is simple , i change the points for the painter.drawPolygon(points, 4); function which is inside the paintEvent()function.
but the points are changed in the other function and whenever it is changed the update function is called to update() the diagram.
is there any way to draw a polygon without using paintEvent() on QWidget.
Bookmarks