Results 1 to 8 of 8

Thread: paintEvent() timing

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2015
    Posts
    7
    Thanks
    2

    Default Re: paintEvent() timing

    Quote Originally Posted by anda_skoa View Post
    Wouldn't it make then especially sense to have a "gallery" application that has all the standard elements?
    Not just for timing but also for checking how the look?
    That's what I did. I have a QSvgThemeBuilder app that shows live previews of themes. I wanted to add timing information.

    Quote Originally Posted by anda_skoa View Post
    You can always register a custom event and send it to yourself, so even if there is no other event in the queue the event loop will have something to process.
    GREAT ! So I can 1) install an event filter on the paint event, 2) grab the time at that moment and 3) postEvent() a custom "finish paint" event. 4) diff time when the finish paint event arrives.

    Will try. Thanks a lot for the help

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: paintEvent() timing

    Quote Originally Posted by dextermagnific View Post
    That's what I did. I have a QSvgThemeBuilder app that shows live previews of themes. I wanted to add timing information.
    Then it is likely the best place to put the timing gathering.

    Quote Originally Posted by dextermagnific View Post
    GREAT ! So I can 1) install an event filter on the paint event, 2) grab the time at that moment and 3) postEvent() a custom "finish paint" event. 4) diff time when the finish paint event arrives.
    Yes. Obviously not as accurate as timing the paintEvent() calls since there could be many events and their handling in between.

    Cheers,
    _

Similar Threads

  1. Tool Tip Visibility Timing
    By Goug in forum Qt Programming
    Replies: 1
    Last Post: 19th January 2012, 01:50
  2. Timing in QProcess output
    By homerun4711 in forum Newbie
    Replies: 0
    Last Post: 20th December 2010, 19:37
  3. Timing for games. Is there anything like SDL_GetTicks
    By ricardo in forum Qt Programming
    Replies: 1
    Last Post: 8th August 2009, 11:24
  4. Timing out a QFtp ConnectToHost
    By skp in forum Qt Programming
    Replies: 10
    Last Post: 27th April 2008, 14:10
  5. Timer not timing out?
    By Mariane in forum Newbie
    Replies: 5
    Last Post: 2nd March 2006, 22:30

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.