Results 1 to 5 of 5

Thread: QGLWidget + QEventDispatcherGlib::processEvents performance problem!

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    19
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11
    Thanked 1 Time in 1 Post

    Exclamation QGLWidget + QEventDispatcherGlib::processEvents performance problem!

    greetings trollers,
    Abstract
    I have problem with QGLWidget and its Event loop or related (QEventDispatcherGlib::processEvents).
    Introduction
    I am sub-classing QGLWidget (class ImgFrame) and use that class (ImgFrame) to paint a QImage. The problem is: although I use separate thread object for manipulating a temporary image prior to copying it to the image of ImgFrame, the main thread uses a lot of CPU time for dispatching internal events not related to my code.
    As a proof of this issue I sub-classed ImgFrame from QWidget instead and the processing speed became 50 folds faster.
    Why Use QGLWidget?
    Well, Intend to use this application mainly for real-time multi-threaded video processing and when painting in 30 frames per sec, drawing on QGLWidget has better performane than QWidget (see the 2dpainting example that comes with QT4.3)
    Attachments
    I attached the source code (Kdevelop project) and Valgrind performance analysis snapshot for further clearance.
    thank you,
    firas
    Attached Files Attached Files

Similar Threads

  1. QGLWidget Resize Problem
    By Sandip in forum Qt Programming
    Replies: 2
    Last Post: 28th February 2008, 07:47
  2. QGLWidget 2d painting performance
    By amnesiac in forum Qt Programming
    Replies: 15
    Last Post: 28th January 2008, 15:09
  3. QGLWidget resize problem.
    By anderl in forum Qt Programming
    Replies: 2
    Last Post: 22nd January 2008, 09:57
  4. why linking problem with QGLWidget???
    By Shuchi Agrawal in forum Newbie
    Replies: 17
    Last Post: 16th March 2007, 11:45
  5. Problem combining QWorkspace & QGLWidget
    By Nb2Qt in forum Qt Programming
    Replies: 1
    Last Post: 18th December 2006, 22:45

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
  •  
Qt is a trademark of The Qt Company.