Results 1 to 2 of 2

Thread: QGraphicsScene / QGraphicsView speed after resize

  1. #1
    Join Date
    Jul 2007
    Location
    New York
    Posts
    45
    Thanks
    5
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default QGraphicsScene / QGraphicsView speed after resize

    I have a strange bug...

    I am writing an app based on the chip example...

    at some point during development, I noticed that my graphicsscene was getting a little slow. I now realize that it is only slow after I resize the window. I have hardcoded the opengl mode to on by manually toggling the opengl button and hiding it. the scene is fast before a resize, and slow after. I have stripped all the additional graphicsitems out to the most simple rectangles, so I'm fairly certain it's not just the number of items.

    a clue here is that after resizing, moving an item with the hand drag mode causes the whole view to jump exactly the amount I resized (ie, if I resize the window +10px in x and y, after dragging an item the whole scene jumps down+right by 10px).

    it seems that something in the resize event is not happening, which is causing slowness.

    if I toggle the opengl button after resizing, the non-opengl is fast again, but opengl is still slow.

    It's wierd... the initial window size is fast in opengl, but other sizes are slow. also, creating the mainwindow and showing with showMaximized does not fix it. only the initial size is fast.

    any ideas?

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicsScene / QGraphicsView speed after resize

    I can't reproduce that here, running Qt 4.3 on Windows Xp.
    I tried with the 40000 Chips demo. It works resized as well as it works at the initial dimensions.

    it seems that something in the resize event is not happening, which is causing slowness.
    Did you write your custom resize event?


    What kind of updates do you do on the view on how often?

    Regards

Similar Threads

  1. QGraphicsView, QGraphicsItem, QGraphicsScene
    By Shuchi Agrawal in forum Newbie
    Replies: 10
    Last Post: 23rd March 2011, 20:50
  2. Speed, transparency, and drop issues with QGraphicsView
    By jefferai in forum Qt Programming
    Replies: 16
    Last Post: 30th June 2007, 16:14
  3. QGraphicsScene and QGraphicsView
    By rossd in forum Qt Programming
    Replies: 2
    Last Post: 25th April 2007, 14:43
  4. QGraphicsView and QGraphicsScene speeds
    By jnk5y in forum Qt Programming
    Replies: 2
    Last Post: 20th October 2006, 07:13
  5. (QT4.2-RC1) QGraphicsScene QGraphicsView QGraphicsItem
    By antonio.r.tome in forum Qt Programming
    Replies: 1
    Last Post: 20th September 2006, 10:56

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.