Results 1 to 5 of 5

Thread: Performance of scene(QGraphicsScene) with update();

Hybrid View

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

    Default Re: Performance of scene(QGraphicsScene) with update();

    I'm suprised the application doesn't crash since you are accessing QObjects across threads.

    Anyway, if you need such an arbitrary update then most likely you have implemented something incorrectly in your scene. A change to the scene should cause it to update automatically and not using a timer of any sort. It's likely you don't call update() on some item when it changes.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Jan 2011
    Posts
    24
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Performance of scene(QGraphicsScene) with update();

    Quote Originally Posted by wysota View Post
    I'm suprised the application doesn't crash since you are accessing QObjects across threads.

    Anyway, if you need such an arbitrary update then most likely you have implemented something incorrectly in your scene. A change to the scene should cause it to update automatically and not using a timer of any sort. It's likely you don't call update() on some item when it changes.
    I've the application like data will be coming from a device continously by which the items in the scene should be shown with color like digital values(green or red) and running values on the scene.so i've to update the scene for every 20ms.

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

    Default Re: Performance of scene(QGraphicsScene) with update();

    Quote Originally Posted by mukunda View Post
    I've the application like data will be coming from a device continously
    So when the data comes, process it and as part of processing call update() on any item that is changed by the data.

    by which the items in the scene should be shown with color like digital values(green or red) and running values on the scene.so i've to update the scene for every 20ms.
    Updating every 20ms yields little sense. You won't be able to notice such frequent updates (50Hz), you'll just be wasting processing cycles. Data processing should also be a result of receiving a notification that there is something to be processed, not upon a timer timeout (unless you have no other choice but then I'd reduce the frequency to around 10Hz max).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QGraphics View Scene performance with polylines
    By iampowerslave in forum Qt Programming
    Replies: 0
    Last Post: 15th November 2010, 17:03
  2. Update scene after moving QGraphicsItem
    By rogerholmes in forum Newbie
    Replies: 1
    Last Post: 19th January 2010, 05:08
  3. QGraphicsScene performance
    By Aceman2000 in forum Qt Programming
    Replies: 4
    Last Post: 2nd June 2008, 18:10
  4. How to update scene after removing items
    By nileshsince1980 in forum Qt Programming
    Replies: 4
    Last Post: 20th September 2007, 09:56
  5. How to find out scene update time
    By nileshsince1980 in forum Qt Programming
    Replies: 5
    Last Post: 20th September 2007, 09:46

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.