November 25, 2011

tonnot tonnot
Lab Rat
15 posts

Qt QGraphicsScene::drawItems substitute ?

 

For QGraphicsScene::drawItems the reference says : Reimplement this function to provide custom painting of all items for the scene; gaining complete control over how each item is drawn. But this function is marked as obsolete . Is there any new equivalent method ? Thanks

1 reply

November 25, 2011

Gerolf Gerolf
Area 51 Engineer
3210 posts

If you look at the docs:

Since Qt 4.6, this function is not called anymore unless the QGraphicsView::IndirectPainting flag is given as an Optimization flag.

As no other option is stated, I assume, you have to use drawForeground for that.

As I looked at the code, I found, that is is still called in QGraphicsScene::render with Qt 4.7.4

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

 
  ‹‹ How to create push type stream object from a URL.      Restricting a movable QGraphicsRectItem in the Scene Rect ››

You must log in to post a reply. Not a member yet? Register here!