Results 1 to 20 of 23

Thread: how to prevent qgraphicsitem repaint while mouse move on it

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Dec 2006
    Posts
    426
    Thanks
    8
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to prevent qgraphicsitem repaint while mouse move on it

    Quote Originally Posted by wysota View Post
    There are at least three different ways to handle your situation. One possibility is to render contents of your item to a pixmap and only update the pixmap when you're not moving the item and if you are then render the old contents. Second possibility is to enable one of the caching modes for the item which does essentially more or less the same. I forgot the third solution
    I am having the same problem, that the QGraphicsItem will do unnecessary paint when the window lose/gain focus or on a mouse movement, even though there is no actual new exposure event occurring.

    I think this is a bug that Qt should fix, rather than asking application developers to find a workaround...

  2. The following user says thank you to lni for this useful post:

    christina123y (9th April 2009)

Similar Threads

  1. Replies: 9
    Last Post: 22nd June 2008, 22:26
  2. Replies: 4
    Last Post: 3rd March 2008, 22:15
  3. Mouse Move Event
    By merry in forum Newbie
    Replies: 5
    Last Post: 3rd June 2007, 06:26
  4. Move Rectangle on mouse Move
    By vermarajeev in forum Qt Programming
    Replies: 24
    Last Post: 14th May 2007, 05:34
  5. how to display full tree item name on mouse move ?
    By rajesh in forum Qt Programming
    Replies: 5
    Last Post: 15th November 2006, 08:41

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.