QGraphicsItem

本文深入探讨了信息技术领域的广泛内容,从基础的前端开发、后端开发到移动应用开发,再到游戏开发、大数据处理、AI音视频处理等细分领域。涵盖了开发工具、嵌入式硬件、音视频基础、测试、基础运维、DevOps、操作系统、云计算、自然语言处理、区块链、隐私计算等多个方面,全面展示了信息技术的多样性与复杂性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

#include

  • QGraphicsEllipseItem provides an ellipse item
  • QGraphicsLineItem provides a line item
  • QGraphicsPathItem provides an arbitrary path item
  • QGraphicsPixmapItem provides a pixmap item
  • QGraphicsPolygonItem provides a polygon item
  • QGraphicsRectItem provides a rectangular item
  • QGraphicsSimpleTextItem provides a simple text label item
  • QGraphicsTextItem provides an advanced text browser item
  •  

    1,The item's position, pos(), is the only function that does not operate in local coordinates, as it returns a position in parent coordinates.

    2,setVisible().setEnabled().

    3,ItemIsSelectable,setSelected().

    4,two pure virtual public functions: boundingRect(),and paint()

    5,prepareGeometryChange(),shape(),collidesWithItem()

    6,contains()

    7,pos().setRotation() or setScale(),setTransform().setTransformations().sceneTransform(),scenePos(),resetTransform().

  • The item's base transform is applied (transform())
  • The item's transformations list is applied in order (transformations())
  • The item is rotated relative to its transform origin point (rotation(), transformOriginPoint())
  • The item is scaled relative to its transform origin point (scale(), transformOriginPoint())
  • 8,setZValue(),sibling items are stacked by insertion order

  • You can call setZValue() on an item to explicitly stack it on top of, or under, other sibling items. The default Z value for an item is 0. Items with the same Z value are stacked by insertion order.
  • You can call stackBefore() to reorder the list of children. This will directly modify the insertion order.
  • You can set the ItemStacksBehindParent flag to stack a child item behind its parent.
  • 9,installSceneEventFilter(),removeSceneEventFilter().

    10,enum QGraphicsItem::CacheMode

    QGraphicsItem::DeviceCoordinateCache  ------>always renders at maximum quality.

    11,enum QGraphicsItem::GraphicsItemChange

    ItemEnabledChange,ItemEnabledHasChanged

    ItemMatrixChange

    ItemPositionChange,ItemPositionHasChanged…This notification is sent if the ItemSendsGeometryChanges flag is enabled,itemChange().

    ItemTransformChange,ItemTransformHasChanged…This notification is send if the ItemSendsGeometryChanges flag is enabled,itemChange().

    ItemSelectedChange,ItemSelectedHasChanged

    ItemVisibleChange,ItemVisibleHasChanged

    ItemParentChange,ItemParentHasChanged

    ItemChildAddedChange,ItemChildRemovedChange

    ItemSceneChange,ItemSceneHasChanged

    ItemCursorChange,ItemCursorHasChanged

    ItemToolTipChange,ItemToolTipHasChanged

    ItemFlagsChange,ItemFlagsHaveChanged

    ItemZValueChange,ItemZValueHasChanged

    ItemOpacityChange,ItemOpacityHasChanged

    ItemScenePositionHasChanged…This notification is sent if the ItemSendsScenePositionChanges flag is enabled

     

    12,

    enum QGraphicsItem::GraphicsItemFlag
    flags QGraphicsItem::GraphicsItemFlags

    ItemIsMovable,ItemIsSelectable,ItemIsFocusable,ItemClipsToShape,ItemClipsChildrenToShape,ItemIgnoresTransformations,ItemIgnoresParentOpacity,ItemDoesntPropagateOpacityToChildren,ItemStacksBehindParent,ItemUsesExtendedStyleOption,ItemHasNoContents,ItemSendsGeometryChanges,ItemAcceptsInputMethod,ItemNegativeZStacksBehindParent,ItemIsPanel,ItemSendsScenePositionChanges

     

    13,enum QGraphicsItem::PanelModality

    NonModal,PanelModal,SceneModal

    14,

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值