Results 1 to 2 of 2

Thread: Strange issue with widget failing to repaint for a long time.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Strange issue with widget failing to repaint for a long time.

    I am having a strange issue with a widget failing to repaint for a long time.

    I have one non-Qt thread that plays audio and periodically posts a custom event to my GUI thread, based on audio playback position. The GUI thread reacts by generating some visual feedback (e.g., display label on top of a widget) and invoking repaint() on itself. This works great on Mac OSX and it works fine within a unit test application I have that exercises the functionality on Windows (XP & 7), however, the widget does not properly repaint in my real application, on Windows XP/7, until the audio playback finishes.

    Proper behaviour observed on OSX and within my unit test:

    -> Custom Event
    -> QEvent::Paint (12)
    -> Custom Event
    -> QEvent::Paint (12)
    etc.

    Wrong behaviour observed in my actual application:

    -> Custom Event
    -> QEvent::UpdateRequest (77)
    -> Custom Event
    -> QEvent::UpdateRequest (77)
    etc.
    -> QEvent::Paint (12)

    I have tried various things to force the repaint to occur, e.g., QCoreApplication::processEvents, but all to no avail. I have also tried eliminating the inter-thread events as a culprit and used a periodic timer to poll the current position from the audio thread and update the widget, also without much luck.

    Any ideas on how to further diagnose this would be greatly appreciated!

    Thanks,
    Alex
    Last edited by alexlordax; 25th August 2011 at 18:37.

Similar Threads

  1. design pattern for long time operation
    By Talei in forum Qt Programming
    Replies: 6
    Last Post: 22nd July 2011, 11:58
  2. Strange responsiveness/repaint behavior.
    By JoeBauman in forum Qt Programming
    Replies: 2
    Last Post: 8th July 2011, 18:14
  3. qt 3.3.8 mainform.ui Compiling time too long
    By lupin982 in forum Qt Programming
    Replies: 0
    Last Post: 8th March 2010, 15:39
  4. repaint issue in qt4
    By ancest in forum Qt Programming
    Replies: 2
    Last Post: 12th March 2009, 10:51
  5. QSqlDatabase Time out no network to long....
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 10th March 2007, 01:41

Tags for this Thread

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.