Obsolete Members for QGraphicsView

以下成员源于类 QGraphicsView 被弃用。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

保护函数

(deprecated) virtual void drawItems (QPainter * painter , int numItems , QGraphicsItem *[] , const QStyleOptionGraphicsItem [] options )

成员函数文档编制

[virtual protected] void QGraphicsView:: drawItems ( QPainter * painter , int numItems , QGraphicsItem *[] , const QStyleOptionGraphicsItem [] options )

This function is deprecated. We strongly advise against using it in new code.

Draws the items in the scene using painter , after the background and before the foreground are drawn. numItems is the number of items in and options in options . options is a list of styleoptions; one for each item. Reimplement this function to provide custom item drawing for this view.

The default implementation calls the scene's drawItems() function.

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

另请参阅 drawForeground (), drawBackground (),和 QGraphicsScene::drawItems ().