# QGraphicsWidget Class Reference

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

Inherits QGraphicsObject.

### Constructor

- void QGraphicsWidget(QGraphicsItem parent, WindowFlags wFlags)

### Constructor Properties

- prototype: The QGraphicsWidget prototype object
- void setTabOrder(QGraphicsWidget first, QGraphicsWidget second)

### Prototype Object Properties

The QGraphicsWidget prototype object inherits properties from the QGraphicsObject prototype object and also has the following properties.

- List actions()
- void addAction(QAction action)
- void addActions(List actions)
- void adjustSize()
- QGraphicsWidget focusWidget()
- void getWindowFrameMargins(qreal left, qreal top, qreal right, qreal bottom)
- int grabShortcut(QKeySequence sequence, ShortcutContext context)
- void insertAction(QAction before, QAction action)
- void insertActions(QAction before, List actions)
- bool isActiveWindow()
- void paintWindowFrame(QPainter painter, QStyleOptionGraphicsItem option, QWidget widget)
- QRectF rect()
- void releaseShortcut(int id)
- void removeAction(QAction action)
- void resize(qreal w, qreal h)
- void setAttribute(WidgetAttribute attribute, bool on)
- void setContentsMargins(qreal left, qreal top, qreal right, qreal bottom)
- void setGeometry(qreal x, qreal y, qreal w, qreal h)
- void setShortcutAutoRepeat(int id, bool enabled)
- void setShortcutEnabled(int id, bool enabled)
- void setStyle(QStyle style)
- void setWindowFrameMargins(qreal left, qreal top, qreal right, qreal bottom)
- QStyle style()
- bool testAttribute(WidgetAttribute attribute)
- void unsetLayoutDirection()
- void unsetWindowFrameMargins()
- QRectF windowFrameGeometry()
- QRectF windowFrameRect()
- WindowType windowType()

### Instance Properties

QGraphicsWidget objects inherit properties from the QGraphicsWidget prototype object and also have the following properties.

- palette
- font
- layoutDirection
- size
- minimumSize
- preferredSize
- maximumSize
- sizePolicy
- focusPolicy
- windowFlags
- windowTitle
- geometry
- autoFillBackground
- layout