Obsolete Members for QStyleOptionGraphicsItem

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

公共变量

(obsolete) qreal levelOfDetail
(obsolete) QMatrix matrix

成员变量文档编制

qreal QStyleOptionGraphicsItem:: levelOfDetail

使用 QStyleOptionGraphicsItem::levelOfDetailFromTransform () together with QPainter::worldTransform () 代替。

QMatrix QStyleOptionGraphicsItem:: matrix

This variable holds the complete transformation matrix for the item

The QMatrix provided through this member does include information about any perspective transformations applied to the view or item. To get the correct transformation matrix, use QPainter::transform () on the painter passed into the QGraphicsItem::paint () 实现。

This matrix is the combination of the item's scene matrix and the matrix of the painter used for drawing the item. It is provided for convenience, allowing anvanced level-of-detail metrics that can be used to speed up item drawing.

To find the dimensions of an item in screen coordinates (i.e., pixels), you can use the mapping functions of QMatrix ,譬如 QMatrix::map ().

This member is only initialized for items that have the QGraphicsItem::ItemUsesExtendedStyleOption 设置标志。

另请参阅 QStyleOptionGraphicsItem::levelOfDetailFromTransform ().