2023年12月8日,周五上午
这些标志位用于配置 QGraphicsItem
类的行为:
ItemIsMovable
:图形项可以被移动。ItemIsSelectable
:图形项可以被选择。ItemIsFocusable
:图形项可以获取焦点。ItemClipsToShape
:图形项被裁剪到其形状。ItemClipsChildrenToShape
:子图形项被裁剪到父图形项的形状。ItemIgnoresTransformations
:图形项忽略场景中的任何变换。ItemIgnoresParentOpacity
:图形项忽略父图形项的不透明度。ItemDoesntPropagateOpacityToChildren
:图形项不将不透明度传递给子图形项。ItemStacksBehindParent
:图形项堆叠在其父图形项的后面。ItemUsesExtendedStyleOption
:使用扩展的样式选项。ItemHasNoContents
:图形项没有内容(不绘制任何东西)。ItemSendsGeometryChanges
:图形项发送几何变化的信号。ItemAcceptsInputMethod
:图形项接受输入法事件。ItemNegativeZStacksBehindParent
:负 Z 堆叠在其父图形项的后面。ItemIsPanel
:图形项是一个面板。ItemIsFocusScope
:(内部标志)图形项是焦点范围。ItemSendsScenePositionChanges
:图形项发送场景位置变化的信号。ItemStopsClickFocusPropagation
:图形项停止点击焦点传播。ItemStopsFocusHandling
:图形项停止处理焦点。ItemContainsChildrenInShape
:图形项的形状包含子图形项。
这些标志位允许你以灵活的方式配置图形项的行为,以满足特定的需求和场景。