# QGraphicsItem Class Reference

### [com.trolltech.qt.gui package]

### Constructor

- void QGraphicsItem(QGraphicsItem parent, QGraphicsScene scene)

### Constructor Properties

- prototype: The QGraphicsItem prototype object
- NoCache
- ItemCoordinateCache
- DeviceCoordinateCache
- CacheMode( value )
- NonModal
- PanelModal
- SceneModal
- PanelModality( value )
- ItemIsMovable = 0x1
- ItemIsSelectable = 0x2
- ItemIsFocusable = 0x4
- ItemClipsToShape = 0x8
- ItemClipsChildrenToShape = 0x10
- ItemIgnoresTransformations = 0x20
- ItemIgnoresParentOpacity = 0x40
- ItemDoesntPropagateOpacityToChildren = 0x80
- ItemStacksBehindParent = 0x100
- ItemUsesExtendedStyleOption = 0x200
- ItemHasNoContents = 0x400
- ItemSendsGeometryChanges = 0x800
- ItemAcceptsInputMethod = 0x1000
- ItemNegativeZStacksBehindParent = 0x2000
- ItemIsPanel = 0x4000
- ItemIsFocusScope = 0x8000
- ItemSendsScenePositionChanges = 0x10000
- ItemStopsClickFocusPropagation = 0x20000
- ItemStopsFocusHandling = 0x40000
- GraphicsItemFlag( value )
- GraphicsItemFlags( value1, value2, ... )
- ItemPositionChange
- ItemMatrixChange
- ItemVisibleChange
- ItemEnabledChange
- ItemSelectedChange
- ItemParentChange
- ItemChildAddedChange
- ItemChildRemovedChange
- ItemTransformChange
- ItemPositionHasChanged
- ItemTransformHasChanged
- ItemSceneChange
- ItemVisibleHasChanged
- ItemEnabledHasChanged
- ItemSelectedHasChanged
- ItemParentHasChanged
- ItemSceneHasChanged
- ItemCursorChange
- ItemCursorHasChanged
- ItemToolTipChange
- ItemToolTipHasChanged
- ItemFlagsChange
- ItemFlagsHaveChanged
- ItemZValueChange
- ItemZValueHasChanged
- ItemOpacityChange
- ItemOpacityHasChanged
- ItemScenePositionHasChanged
- ItemRotationChange
- ItemRotationHasChanged
- ItemScaleChange
- ItemScaleHasChanged
- ItemTransformOriginPointChange
- ItemTransformOriginPointHasChanged
- GraphicsItemChange( value )

### Prototype Object Properties

- bool acceptDrops()
- bool acceptHoverEvents()
- bool acceptTouchEvents()
- MouseButtons acceptedMouseButtons()
- bool acceptsHoverEvents()
- void advance(int phase)
- QRectF boundingRect()
- QRegion boundingRegion(QTransform itemToDeviceTransform)
- qreal boundingRegionGranularity()
- CacheMode cacheMode()
- List childItems()
- QRectF childrenBoundingRect()
- void clearFocus()
- QPainterPath clipPath()
- bool collidesWithItem(QGraphicsItem other, ItemSelectionMode mode)
- bool collidesWithPath(QPainterPath path, ItemSelectionMode mode)
- List collidingItems(ItemSelectionMode mode)
- QGraphicsItem commonAncestorItem(QGraphicsItem other)
- bool contains(QPointF point)
- QCursor cursor()
- Object data(int key)
- QTransform deviceTransform(QTransform viewportTransform)
- qreal effectiveOpacity()
- void ensureVisible(QRectF rect, int xmargin, int ymargin)
- bool filtersChildEvents()
- GraphicsItemFlags flags()
- QGraphicsItem focusItem()
- QGraphicsItem focusProxy()
- QGraphicsItem focusScopeItem()
- void grabKeyboard()
- void grabMouse()
- QGraphicsEffect graphicsEffect()
- QGraphicsItemGroup group()
- bool handlesChildEvents()
- bool hasCursor()
- bool hasFocus()
- void hide()
- InputMethodHints inputMethodHints()
- void installSceneEventFilter(QGraphicsItem filterItem)
- bool isActive()
- bool isAncestorOf(QGraphicsItem child)
- bool isBlockedByModalPanel(QGraphicsItem blockingPanel)
- bool isClipped()
- bool isEnabled()
- bool isObscured()
- bool isObscuredBy(QGraphicsItem item)
- bool isPanel()
- bool isSelected()
- bool isUnderMouse()
- bool isVisible()
- bool isVisibleTo(QGraphicsItem parent)
- bool isWidget()
- bool isWindow()
- QTransform itemTransform(QGraphicsItem other, bool ok)
- QPainterPath mapFromItem(QGraphicsItem item, QPainterPath path)
- QPainterPath mapFromParent(QPainterPath path)
- QPainterPath mapFromScene(QPainterPath path)
- QRectF mapRectFromItem(QGraphicsItem item, QRectF rect)
- QRectF mapRectFromParent(QRectF rect)
- QRectF mapRectFromScene(QRectF rect)
- QRectF mapRectToItem(QGraphicsItem item, QRectF rect)
- QRectF mapRectToParent(QRectF rect)
- QRectF mapRectToScene(QRectF rect)
- QPainterPath mapToItem(QGraphicsItem item, QPainterPath path)
- QPainterPath mapToParent(QPainterPath path)
- QPainterPath mapToScene(QPainterPath path)
- void moveBy(qreal dx, qreal dy)
- qreal opacity()
- QPainterPath opaqueArea()
- void paint(QPainter painter, QStyleOptionGraphicsItem option, QWidget widget)
- QGraphicsItem panel()
- PanelModality panelModality()
- QGraphicsItem parentItem()
- QGraphicsObject parentObject()
- QGraphicsWidget parentWidget()
- QPointF pos()
- void removeSceneEventFilter(QGraphicsItem filterItem)
- void resetTransform()
- void rotate(qreal angle)
- qreal rotation()
- qreal scale()
- QGraphicsScene scene()
- QRectF sceneBoundingRect()
- QPointF scenePos()
- QTransform sceneTransform()
- void scroll(qreal dx, qreal dy, QRectF rect)
- void setAcceptDrops(bool on)
- void setAcceptHoverEvents(bool enabled)
- void setAcceptTouchEvents(bool enabled)
- void setAcceptedMouseButtons(MouseButtons buttons)
- void setAcceptsHoverEvents(bool enabled)
- void setActive(bool active)
- void setBoundingRegionGranularity(qreal granularity)
- void setCacheMode(CacheMode mode, QSize cacheSize)
- void setCursor(QCursor cursor)
- void setData(int key, Object value)
- void setEnabled(bool enabled)
- void setFiltersChildEvents(bool enabled)
- void setFlag(GraphicsItemFlag flag, bool enabled)
- void setFlags(GraphicsItemFlags flags)
- void setFocus(FocusReason focusReason)
- void setFocusProxy(QGraphicsItem item)
- void setGraphicsEffect(QGraphicsEffect effect)
- void setGroup(QGraphicsItemGroup group)
- void setHandlesChildEvents(bool enabled)
- void setInputMethodHints(InputMethodHints hints)
- void setOpacity(qreal opacity)
- void setPanelModality(PanelModality panelModality)
- void setParentItem(QGraphicsItem parent)
- void setPos(QPointF pos)
- void setRotation(qreal angle)
- void setScale(qreal scale)
- void setSelected(bool selected)
- void setToolTip(String toolTip)
- void setTransform(QTransform matrix, bool combine)
- void setTransformOriginPoint(QPointF origin)
- void setTransformations(List transformations)
- void setVisible(bool visible)
- void setX(qreal x)
- void setY(qreal y)
- void setZValue(qreal z)
- QPainterPath shape()
- void shear(qreal sh, qreal sv)
- void show()
- void stackBefore(QGraphicsItem sibling)
- QGraphicsObject toGraphicsObject()
- String toolTip()
- QGraphicsItem topLevelItem()
- QGraphicsWidget topLevelWidget()
- QTransform transform()
- QPointF transformOriginPoint()
- List transformations()
- void translate(qreal dx, qreal dy)
- int type()
- void ungrabKeyboard()
- void ungrabMouse()
- void unsetCursor()
- void update(QRectF rect)
- QGraphicsWidget window()
- qreal x()
- qreal y()
- qreal zValue()

### Instance Properties

QGraphicsItem objects have no special properties beyond those inherited from the QGraphicsItem prototype object.