Results 1 to 11 of 11

Thread: double buffering

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Knivsta, Sweden
    Posts
    153
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11
    Thanks
    30
    Thanked 13 Times in 12 Posts

    Default Re: double buffering

    I'd try calling update() or repaint() on the widget that has the pixmap, and probably processEvents too, but I'm sure there are more elegant ways.

  2. #2
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    4
    Thanked 140 Times in 132 Posts

    Default Re: double buffering

    i would also suggest using layouts than setting the buttons positions manually
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  3. #3
    Join Date
    Feb 2009
    Location
    Guangzhou,China
    Posts
    89
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    17

    Default Re: double buffering

    Quote Originally Posted by drhex View Post
    I'd try calling update() or repaint() on the widget that has the pixmap, and probably processEvents too, but I'm sure there are more elegant ways.
    repaint() is OK

    Thanks

  4. #4
    Join Date
    Feb 2009
    Location
    Guangzhou,China
    Posts
    89
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    17

    Default Re: double buffering

    Why must I call repaint, but oneStep can do the same thing without call it?

  5. #5
    Join Date
    Jan 2006
    Location
    Knivsta, Sweden
    Posts
    153
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11
    Thanks
    30
    Thanked 13 Times in 12 Posts

    Default Re: double buffering

    Because when you draw in execOnce(), a flag is set indicating that an update is necessary. That flag is acted upon when the main event loop is run (after your slot has finished). runAll(), though, wants to do many updates without returning from the slot between each and so needs to do more explicit repainting.

  6. #6
    Join Date
    Feb 2009
    Location
    Guangzhou,China
    Posts
    89
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    17

    Default Re: double buffering

    Thanks to drhex

Similar Threads

  1. Double Click Capturing
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 8th January 2011, 15:12
  2. Full Screen Double Click?
    By winston2020 in forum Qt Programming
    Replies: 4
    Last Post: 3rd June 2010, 13:37
  3. Double Buffering for plot graphs
    By Tavit in forum Qt Programming
    Replies: 0
    Last Post: 20th March 2008, 14:10
  4. Double Buffer
    By ^NyAw^ in forum Qt Programming
    Replies: 23
    Last Post: 29th January 2008, 19:35
  5. Replies: 5
    Last Post: 12th January 2006, 16:40

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.