Results 1 to 4 of 4

Thread: GraphicsView: how to avoid animated background when animating sceneRect

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2009
    Location
    Mexico
    Posts
    81
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    6
    Thanked 10 Times in 10 Posts

    Default Re: GraphicsView: how to avoid animated background when animating sceneRect

    i cant complete visualize you problem. maybe some screenshot or even better the minimal source code who reproduce your problem.

    meanwile you maybe try some one of this options
    - draw background in the view not the scene. set QGrapicsView::setBackgroundBrush(),
    - reimplement QGraphicsView::drawBackground() this provide more control over how painting the background

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,349
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    318
    Thanked 872 Times in 859 Posts

    Default Re: GraphicsView: how to avoid animated background when animating sceneRect

    You might also try one of the caching options on the QGraphicsItem that holds the images. This was vital in my app to allow smooth rubber banding over a complex background graphic. Using caching on the graphic meant that it would only be physically redrawn when the content or size changed; all the rest of the time it was simply blitted from the cache, with no noticeable flicker at all.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. QGraphicsscene.sceneRect on Windows platform
    By sanku3 in forum Qt Programming
    Replies: 0
    Last Post: 26th September 2011, 08:12
  2. bad sceneRect with scaled text
    By koosh in forum Qt Programming
    Replies: 14
    Last Post: 10th July 2008, 19:29
  3. put image on scenerect
    By dreamer in forum Qt Programming
    Replies: 3
    Last Post: 13th May 2008, 06:55
  4. GraphicsView update background
    By maverick_pol in forum Qt Programming
    Replies: 9
    Last Post: 27th February 2008, 19:25
  5. QGraphicsScene: evolution of sceneRect
    By Pieter from Belgium in forum Qt Programming
    Replies: 2
    Last Post: 10th November 2006, 15:11

Tags for this Thread

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.