Results 1 to 7 of 7

Thread: graphicsview Problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: graphicsview Problem

    Hi,

    The problem is That I have a structure like this:

    I have a QGraphicsWdget which is more or less acting as a container for all me items.
    Than I have used qgridlayout and added all me items to it .this gridlayout is than set as child to the qgraphicswidget.

    Now when i update any thing,its trying to paint all the scene items.I saw that using cache to gQGraphicItem would reduce repainting.
    If so than where would be the best place to have it,QGraphicsWidget or to the items themselves??

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: graphicsview Problem

    Quote Originally Posted by tampstaffs View Post
    Now when i update any thing,its trying to paint all the scene items.
    That's probably the graphics widget item has to be repainted and that forces a repaint of all items that occupy its boundingRect() which means all items in your case.

    If so than where would be the best place to have it,QGraphicsWidget or to the items themselves??
    If all you want is a grid and you don't intend to resize the widget or anything, I'd suggest getting rid of QGraphicsWidget and positioning items yourself. Then only those items that get modified will get repainted.

Similar Threads

  1. QSound Problem with GraphicsView
    By QbelcorT in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 14th January 2009, 12:28
  2. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 09:12
  3. Steps in solving a programming problem?
    By triperzonak in forum General Programming
    Replies: 8
    Last Post: 5th August 2008, 08:47
  4. graphicsview performance problem
    By kernel_panic in forum Qt Programming
    Replies: 16
    Last Post: 23rd December 2007, 18:19
  5. GraphicsView rotate problem
    By forrestfsu in forum Qt Programming
    Replies: 7
    Last Post: 21st November 2007, 20:20

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.