How can I draw on QWidget(element on my form)?
I read many tutorials but none of them covers what I really have to do(draw some Rect on QWidget) .
I made a class MyFigure which inherits from QWidget, and at even paint wrote some code to draw a rectangle. Then, in my Form Create I create MyFigure object, and just show it.
IT DOESN"T WORK!!!
QGraphicsView and QGraphicsScene are good for painting, but if you want to draw on QWidget you need to reimplement paintEvent:
This code will fill your widget with white color.