Hello,
I tried different scenarios and here are the observations.
case-1: QT3.3.. Application has a Widget which has an openGLWidget , LineEdits and Buttons in its layout.
Part of the drawing is changing every 150 msec.
case-2: QT3.3.. Another Widget is created for zoomed view (but not added to the layout of the MainWidget).
I draw on this Widget in this way: Timer=>repaint=>paintEvent
case-3:QT3.3 ... Another Widget is created for zoomed view which has Canvas and Canvasview.
OCanvasPolygonItem is added to the Canvas.
I draw on this widget in this way Timer->canvas_update()=>update()=>drawShape of Item
case-4:QT 4.23..Another Widget is created for zoomed view which has Scene and Sceneview .
QGraphicItem is added to the Scene.
I draw on this widget in this way Timer->scene_update()=>update()=>paint of Item
When the openGLWidget in case-1 obscured by another window and uncovered again without any erased area.
The erased area repaired somehow without acccessing my drawing functions.
When the ZoomWidget in case-2 obscured by another window and uncovered again erased area appears.
System calls my PaintEvent function but I have nothing for recovery.
When the CanvasWidget in case-3 obscured by another window and uncovered again erased area appears.
When the SceneWidget in case-4 obscured by another window and uncovered again ,
erased area appears and don't call my paint function.
Has someone an explanation for these behaviors? Can You suggest a better way?
Thanks.
Bookmarks