Results 1 to 5 of 5

Thread: Different behaviors of GLWidget,Widget,Canvas,Scene when obscured by other windows

  1. #1
    Join Date
    Aug 2007
    Posts
    13
    Thanks
    3
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Different behaviors of GLWidget,Widget,Canvas,Scene when obscured by other windows

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Different behaviors of GLWidget,Widget,Canvas,Scene when obscured by other windo

    but what exactly is the problem?

  3. #3
    Join Date
    Aug 2007
    Posts
    13
    Thanks
    3
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Different behaviors of GLWidget,Widget,Canvas,Scene when obscured by other windo

    The problem is: I cant update the Zoom window entirely at once ,because it takes too long ,
    other threads which requesting data from an signal processing board(actually from the kernel module of the same board kernel buffer overflows before I read it) and forwarding data via ethernet loosing data .
    That's way I update the zoom window in time ,in small parts.Refreshing an erased part of the window obscured by another window, by my functions will take again too long.I need a solution without my effort,like i observed in opengl case (it recovers without calling my code ).Is this unique to opengl?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Different behaviors of GLWidget,Widget,Canvas,Scene when obscured by other windo

    This is an X11 issue. I think that using extensions such as Damage, you could avoid redraws, but I'm not sure of that. I suggest you cache the result of the last draw in a pixmap and simply redraw the pixmap when the paint event comes in. Just make sure to regenerate the pixmap when the contents of the widget change.

  5. #5
    Join Date
    Aug 2007
    Posts
    13
    Thanks
    3
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Different behaviors of GLWidget,Widget,Canvas,Scene when obscured by other windo

    Thank You wysota

    I will try .

Similar Threads

  1. converting unix exe to windows binary
    By deekayt in forum General Programming
    Replies: 2
    Last Post: 17th September 2006, 01:00
  2. Qt and windows vista
    By munna in forum General Discussion
    Replies: 8
    Last Post: 11th January 2006, 22:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.