Results 1 to 6 of 6

Thread: GUI Unhappy With QTimer

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    qtoptus Guest

    Default GUI Unhappy With QTimer

    Hello,

    I'm trying to implement an on-idle event for a single window application. What I did is creating a timer in the main window class and set the time out interval to 0. The on-idle callback function is invoked with no problem except that when the timer's timeout is 0, the application window's titlebar context menu does not render it's text until i hover over the items. So when rightclicking the title bar the menu shows but no items are rendered. Any idea why the timer causing this? Is there any work around?

    Qt Code:
    1. QTimer timer;
    2.  
    3. timer.setInterval(0);
    4.  
    5. connect(&timer, SIGNAL(timeout()), SLOT(onIdle()));
    6.  
    7. timer.start();
    8.  
    9.  
    10. ...::onIdle()
    11. {
    12.  
    13. // do something...
    14.  
    15. }
    To copy to clipboard, switch view to plain text mode 

    Thanks.
    Last edited by qtoptus; 18th October 2011 at 18:29.

Similar Threads

  1. Use a QTimer in a Qt-non-GUI app.
    By hakermania in forum Newbie
    Replies: 11
    Last Post: 29th August 2010, 11:36
  2. Use of QTimer
    By A.H.M. Mahfuzur Rahman in forum Qt Programming
    Replies: 4
    Last Post: 7th August 2009, 14:52
  3. QTimer
    By link7 in forum Newbie
    Replies: 4
    Last Post: 2nd June 2009, 09:35
  4. QTimer
    By Ahmad in forum Qt Programming
    Replies: 1
    Last Post: 22nd October 2007, 19:26
  5. QTimer
    By nirup in forum Qt Programming
    Replies: 1
    Last Post: 29th May 2007, 15:13

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.