Results 1 to 2 of 2

Thread: GUI Thread repaint issue

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default GUI Thread repaint issue

    Hello,

    I've recently noticed in my newly-written Qt application that it seems that the GUI thread will become "stuck" at some points, causing repaints not to happen. For example, when clicking on a QPushButton with a QMenu set, I've noticed that some times the QMenu frame will be painted, but the inside of the menu will not. It isn't until I move the mouse on-screen that the repaint happens, causing the QMenu to be fully visible. I'm not capturing any GUI events at the point where the QMenu is popped-up, so I'm a little baffeled as to why this is happening.

    For a little more info, the application is multi-threaded using signals/slots for communication, with the assurance that all GUI code is being called only from the GUI thread. I'm not setting any special flags on my QMainWindow, and have tried many window flags to see if it helps. None of my other threads in the application are blocked, the processor is not pegged, but nothing happens on the GUI thread again until I move the mouse.

    However, I have found that for other repaint situations that do not apply to the QMenu drawing, I can set a QTimer on the GUI thread and have a "repaint()" every tick, and things do repaint.

    Has anyone had experience with a similar problem??

    Thanks in advance!

    Developing using:
    - Windows XP SP3
    - Qt SDK 2010.02.1 (Qt 4.6)

  2. #2
    Join Date
    Jun 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: GUI Thread repaint issue

    Hi
    I am also facing similar probem in windows7 with system context tray menu. Once this happens the system menu does not draw the menu item.
    I am doing some background processing in another thread which is not blocking ui thread. But still this is happening.

    OS: Windows 7
    QT Version : QT4.6

Similar Threads

  1. Replies: 9
    Last Post: 28th November 2009, 20:31
  2. Replies: 16
    Last Post: 7th October 2009, 08:17
  3. repaint issue in qt4
    By ancest in forum Qt Programming
    Replies: 2
    Last Post: 12th March 2009, 09:51
  4. stylesheet loading issue - thread
    By talk2amulya in forum Qt Programming
    Replies: 8
    Last Post: 26th February 2009, 12:53
  5. QSystemTrayIcon thread issue
    By TheGrimace in forum Qt Programming
    Replies: 8
    Last Post: 25th September 2007, 21:51

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.