- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | Friends

# QGraphicsWidget Class Reference

Search for all occurrences

## Detailed Description

Definition at line 69 of file qgraphicswidget.h.

`#include <qgraphicswidget.h>`

Inheritance diagram for QGraphicsWidget:
[legend]

List of all members.

## Public Types
enum | { Type = 11 }
## Public Slots
bool | close ()
## Signals
void | geometryChanged ()
void | layoutChanged ()
## Public Member Functions
| QGraphicsWidget (QGraphicsItem *parent=0, Qt::WindowFlags wFlags=0)
| ~QGraphicsWidget ()
QGraphicsLayout * | layout () const
void | setLayout (QGraphicsLayout *layout)
void | adjustSize ()
Qt::LayoutDirection | layoutDirection () const
void | setLayoutDirection (Qt::LayoutDirection direction)
void | unsetLayoutDirection ()
QStyle * | style () const
void | setStyle (QStyle *style)
QFont | font () const
void | setFont (const QFont &font)
QPalette | palette () const
void | setPalette (const QPalette &palette)
bool | autoFillBackground () const
void | setAutoFillBackground (bool enabled)
void | resize (const QSizeF &size)
void | resize (qreal w, qreal h)
QSizeF | size () const
void | setGeometry (const QRectF &rect)
void | setGeometry (qreal x, qreal y, qreal w, qreal h)
QRectF | rect () const
void | setContentsMargins (qreal left, qreal top, qreal right, qreal bottom)
void | getContentsMargins (qreal *left, qreal *top, qreal *right, qreal *bottom) const
void | setWindowFrameMargins (qreal left, qreal top, qreal right, qreal bottom)
void | getWindowFrameMargins (qreal *left, qreal *top, qreal *right, qreal *bottom) const
void | unsetWindowFrameMargins ()
QRectF | windowFrameGeometry () const
QRectF | windowFrameRect () const
Qt::WindowFlags | windowFlags () const
Qt::WindowType | windowType () const
void | setWindowFlags (Qt::WindowFlags wFlags)
bool | isActiveWindow () const
void | setWindowTitle (const QString &title)
QString | windowTitle () const
Qt::FocusPolicy | focusPolicy () const
void | setFocusPolicy (Qt::FocusPolicy policy)
QGraphicsWidget * | focusWidget () const
int | grabShortcut (const QKeySequence &sequence, Qt::ShortcutContext context=Qt::WindowShortcut)
void | releaseShortcut (int id)
void | setShortcutEnabled (int id, bool enabled=true)
void | setShortcutAutoRepeat (int id, bool enabled=true)
void | addAction (QAction *action)
void | addActions (QList< QAction * > actions)
void | insertAction (QAction *before, QAction *action)
void | insertActions (QAction *before, QList< QAction * > actions)
void | removeAction (QAction *action)
QList< QAction * > | actions () const
void | setAttribute (Qt::WidgetAttribute attribute, bool on=true)
bool | testAttribute (Qt::WidgetAttribute attribute) const
int | type () const
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
virtual void | paintWindowFrame (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
QRectF | boundingRect () const
QPainterPath | shape () const
## Static Public Member Functions
static void | setTabOrder (QGraphicsWidget *first, QGraphicsWidget *second)
## Protected Member Functions
virtual void | initStyleOption (QStyleOption *option) const
QSizeF | sizeHint (Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const
void | updateGeometry ()
QVariant | itemChange (GraphicsItemChange change, const QVariant &value)
virtual QVariant | propertyChange (const QString &propertyName, const QVariant &value)
bool | sceneEvent (QEvent *event)
virtual bool | windowFrameEvent (QEvent *e)
virtual Qt::WindowFrameSection | windowFrameSectionAt (const QPointF &pos) const
bool | event (QEvent *event)
virtual void | changeEvent (QEvent *event)
virtual void | closeEvent (QCloseEvent *event)
void | focusInEvent (QFocusEvent *event)
virtual bool | focusNextPrevChild (bool next)
void | focusOutEvent (QFocusEvent *event)
virtual void | hideEvent (QHideEvent *event)
virtual void | moveEvent (QGraphicsSceneMoveEvent *event)
virtual void | polishEvent ()
virtual void | resizeEvent (QGraphicsSceneResizeEvent *event)
virtual void | showEvent (QShowEvent *event)
virtual void | hoverMoveEvent (QGraphicsSceneHoverEvent *event)
virtual void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
virtual void | grabMouseEvent (QEvent *event)
virtual void | ungrabMouseEvent (QEvent *event)
virtual void | grabKeyboardEvent (QEvent *event)
virtual void | ungrabKeyboardEvent (QEvent *event)
| QGraphicsWidget (QGraphicsWidgetPrivate &, QGraphicsItem *parent, QGraphicsScene *, Qt::WindowFlags wFlags=0)
## Properties
QPalette | palette
QFont | font
Qt::LayoutDirection | layoutDirection
QSizeF | size
QSizeF | minimumSize
QSizeF | preferredSize
QSizeF | maximumSize
QSizePolicy | sizePolicy
Qt::FocusPolicy | focusPolicy
Qt::WindowFlags | windowFlags
QString | windowTitle
QRectF | geometry
bool | autoFillBackground
QGraphicsLayout | layout
## Friends
class | QGraphicsScene
class | QGraphicsScenePrivate
class | QGraphicsView
class | QGraphicsItem
class | QGraphicsItemPrivate
class | QGraphicsLayout
class | QWidget
class | QApplication

## Member Enumeration Documentation

anonymous enum

Search for all occurrences

Enumerator:

  Type | Search for all occurrences

Definition at line 161 of file qgraphicswidget.h.

             {
            Type = 11
        };

## Constructor & Destructor Documentation

QGraphicsWidget | ( | QGraphicsItem * | parent = `0`,
|  | Qt::WindowFlags | wFlags = `0`
| ) |  |

~QGraphicsWidget | ( |  | ) |

QGraphicsWidget | ( | QGraphicsWidgetPrivate & | ,
|  | QGraphicsItem * | parent,
|  | QGraphicsScene * | ,
|  | Qt::WindowFlags | wFlags = `0`
| ) |  | `[protected]`

## Member Function Documentation

QGraphicsLayout* layout | ( |  | ) | const

Search for all occurrences

void setLayout | ( | QGraphicsLayout * | layout | ) |

Search for all occurrences

void adjustSize | ( |  | ) |

Search for all occurrences

Qt::LayoutDirection layoutDirection | ( |  | ) | const

Search for all occurrences

void setLayoutDirection | ( | Qt::LayoutDirection | direction | ) |

Search for all occurrences

void unsetLayoutDirection | ( |  | ) |

Search for all occurrences

QStyle* style | ( |  | ) | const

Search for all occurrences

void setStyle | ( | QStyle * | style | ) |

Search for all occurrences

QFont font | ( |  | ) | const

Search for all occurrences

void setFont | ( | const QFont & | font | ) |

Search for all occurrences

QPalette palette | ( |  | ) | const

Search for all occurrences

void setPalette | ( | const QPalette & | palette | ) |

Search for all occurrences

bool autoFillBackground | ( |  | ) | const

Search for all occurrences

void setAutoFillBackground | ( | bool | enabled | ) |

Search for all occurrences

void resize | ( | const QSizeF & | size | ) |

Search for all occurrences

void resize | ( | qreal | w,
|  | qreal | h
| ) |  | `[inline]`

Search for all occurrences

Definition at line 111 of file qgraphicswidget.h.

    { resize(QSizeF(w, h)); }

QSizeF size | ( |  | ) | const

Search for all occurrences

void setGeometry | ( | const QRectF & | rect | ) | `[virtual]`

Search for all occurrences

Reimplemented from QGraphicsLayoutItem.

Reimplemented in QGraphicsProxyWidget, and QGraphicsWebView.

void setGeometry | ( | qreal | x,
|  | qreal | y,
|  | qreal | w,
|  | qreal | h
| ) |  | `[inline]`

Search for all occurrences

Definition at line 247 of file qgraphicswidget.h.

    { setGeometry(QRectF(ax, ay, aw, ah)); }

QRectF rect | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 116 of file qgraphicswidget.h.

    { return QRectF(QPointF(), size()); }

void setContentsMargins | ( | qreal | left,
|  | qreal | top,
|  | qreal | right,
|  | qreal | bottom
| ) |  |

Search for all occurrences

void getContentsMargins | ( | qreal * | left,
|  | qreal * | top,
|  | qreal * | right,
|  | qreal * | bottom
| ) |  | const `[virtual]`

Search for all occurrences

Reimplemented from QGraphicsLayoutItem.

void setWindowFrameMargins | ( | qreal | left,
|  | qreal | top,
|  | qreal | right,
|  | qreal | bottom
| ) |  |

Search for all occurrences

void getWindowFrameMargins | ( | qreal * | left,
|  | qreal * | top,
|  | qreal * | right,
|  | qreal * | bottom
| ) |  | const

Search for all occurrences

void unsetWindowFrameMargins | ( |  | ) |

Search for all occurrences

QRectF windowFrameGeometry | ( |  | ) | const

Search for all occurrences

QRectF windowFrameRect | ( |  | ) | const

Search for all occurrences

Qt::WindowFlags windowFlags | ( |  | ) | const

Search for all occurrences

Qt::WindowType windowType | ( |  | ) | const

Search for all occurrences

void setWindowFlags | ( | Qt::WindowFlags | wFlags | ) |

Search for all occurrences

bool isActiveWindow | ( |  | ) | const

Search for all occurrences

void setWindowTitle | ( | const QString & | title | ) |

Search for all occurrences

QString windowTitle | ( |  | ) | const

Search for all occurrences

Qt::FocusPolicy focusPolicy | ( |  | ) | const

Search for all occurrences

void setFocusPolicy | ( | Qt::FocusPolicy | policy | ) |

Search for all occurrences

static void setTabOrder | ( | QGraphicsWidget * | first,
|  | QGraphicsWidget * | second
| ) |  | `[static]`

Search for all occurrences

QGraphicsWidget* focusWidget | ( |  | ) | const

Search for all occurrences

int grabShortcut | ( | const QKeySequence & | sequence,
|  | Qt::ShortcutContext | context = `Qt::WindowShortcut`
| ) |  |

Search for all occurrences

void releaseShortcut | ( | int | id | ) |

Search for all occurrences

void setShortcutEnabled | ( | int | id,
|  | bool | enabled = `true`
| ) |  |

Search for all occurrences

void setShortcutAutoRepeat | ( | int | id,
|  | bool | enabled = `true`
| ) |  |

Search for all occurrences

void addAction | ( | QAction * | action | ) |

Search for all occurrences

void addActions | ( | QList< QAction * > | actions | ) |

Search for all occurrences

void insertAction | ( | QAction * | before,
|  | QAction * | action
| ) |  |

Search for all occurrences

void insertActions | ( | QAction * | before,
|  | QList< QAction * > | actions
| ) |  |

Search for all occurrences

void removeAction | ( | QAction * | action | ) |

Search for all occurrences

QList<QAction*> actions | ( |  | ) | const

Search for all occurrences

void setAttribute | ( | Qt::WidgetAttribute | attribute,
|  | bool | on = `true`
| ) |  |

Search for all occurrences

bool testAttribute | ( | Qt::WidgetAttribute | attribute | ) | const

Search for all occurrences

int type | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

Reimplemented in QGraphicsProxyWidget.

void paint | ( | QPainter * | painter,
|  | const QStyleOptionGraphicsItem * | option,
|  | QWidget * | widget = `0`
| ) |  | `[virtual]`

Search for all occurrences

Implements QGraphicsItem.

Reimplemented in QGraphicsProxyWidget, and QGraphicsWebView.

virtual void paintWindowFrame | ( | QPainter * | painter,
|  | const QStyleOptionGraphicsItem * | option,
|  | QWidget * | widget = `0`
| ) |  | `[virtual]`

Search for all occurrences

QRectF boundingRect | ( |  | ) | const `[virtual]`

Search for all occurrences

Implements QGraphicsItem.

QPainterPath shape | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

void geometryChanged | ( |  | ) | `[signal]`

Search for all occurrences

void layoutChanged | ( |  | ) | `[signal]`

Search for all occurrences

bool close | ( |  | ) | `[slot]`

Search for all occurrences

virtual void initStyleOption | ( | QStyleOption * | option | ) | const `[protected, virtual]`

Search for all occurrences

QSizeF sizeHint | ( | Qt::SizeHint | which,
|  | const QSizeF & | constraint = `QSizeF()`
| ) |  | const `[protected, virtual]`

Search for all occurrences

Implements QGraphicsLayoutItem.

Reimplemented in QGraphicsProxyWidget, and QGraphicsWebView.

void updateGeometry | ( |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsLayoutItem.

Reimplemented in QGraphicsWebView.

QVariant itemChange | ( | GraphicsItemChange | change,
|  | const QVariant & | value
| ) |  | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

Reimplemented in QGraphicsProxyWidget, and QGraphicsWebView.

virtual QVariant propertyChange | ( | const QString & | propertyName,
|  | const QVariant & | value
| ) |  | `[protected, virtual]`

Search for all occurrences

bool sceneEvent | ( | QEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

Reimplemented in QGraphicsWebView.

virtual bool windowFrameEvent | ( | QEvent * | e | ) | `[protected, virtual]`

Search for all occurrences

virtual Qt::WindowFrameSection windowFrameSectionAt | ( | const QPointF & | pos | ) | const `[protected, virtual]`

Search for all occurrences

bool event | ( | QEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QObject.

Reimplemented in QGraphicsProxyWidget, and QGraphicsWebView.

virtual void changeEvent | ( | QEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

virtual void closeEvent | ( | QCloseEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

void focusInEvent | ( | QFocusEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

Reimplemented in QGraphicsProxyWidget, and QGraphicsWebView.

virtual bool focusNextPrevChild | ( | bool | next | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented in QGraphicsProxyWidget, and QGraphicsWebView.

void focusOutEvent | ( | QFocusEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

Reimplemented in QGraphicsProxyWidget, and QGraphicsWebView.

virtual void hideEvent | ( | QHideEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented in QGraphicsProxyWidget.

virtual void moveEvent | ( | QGraphicsSceneMoveEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

virtual void polishEvent | ( |  | ) | `[protected, virtual]`

Search for all occurrences

virtual void resizeEvent | ( | QGraphicsSceneResizeEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented in QGraphicsProxyWidget.

virtual void showEvent | ( | QShowEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented in QGraphicsProxyWidget.

virtual void hoverMoveEvent | ( | QGraphicsSceneHoverEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

Reimplemented in QGraphicsProxyWidget, and QGraphicsWebView.

virtual void hoverLeaveEvent | ( | QGraphicsSceneHoverEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

Reimplemented in QGraphicsProxyWidget, and QGraphicsWebView.

virtual void grabMouseEvent | ( | QEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented in QGraphicsProxyWidget.

virtual void ungrabMouseEvent | ( | QEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented in QGraphicsProxyWidget.

virtual void grabKeyboardEvent | ( | QEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

virtual void ungrabKeyboardEvent | ( | QEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

## Friends And Related Function Documentation

friend class QGraphicsScene `[friend]`

Search for all occurrences

Reimplemented from QGraphicsItem.

Definition at line 237 of file qgraphicswidget.h.

friend class QGraphicsScenePrivate `[friend]`

Search for all occurrences

Reimplemented from QGraphicsItem.

Definition at line 238 of file qgraphicswidget.h.

friend class QGraphicsView `[friend]`

Search for all occurrences

Reimplemented from QGraphicsItem.

Definition at line 239 of file qgraphicswidget.h.

friend class QGraphicsItem `[friend]`

Search for all occurrences

Reimplemented from QGraphicsObject.

Reimplemented in QGraphicsProxyWidget.

Definition at line 240 of file qgraphicswidget.h.

friend class QGraphicsItemPrivate `[friend]`

Search for all occurrences

Reimplemented from QGraphicsObject.

Definition at line 241 of file qgraphicswidget.h.

friend class QGraphicsLayout `[friend]`

Search for all occurrences

Reimplemented from QGraphicsLayoutItem.

Definition at line 242 of file qgraphicswidget.h.

friend class QWidget `[friend]`

Search for all occurrences

Reimplemented from QObject.

Definition at line 243 of file qgraphicswidget.h.

friend class QApplication `[friend]`

Search for all occurrences

Reimplemented from QObject.

Definition at line 244 of file qgraphicswidget.h.

## Property Documentation

QPalette palette `[read, write]`

Search for all occurrences

Definition at line 73 of file qgraphicswidget.h.

QFont font `[read, write]`

Search for all occurrences

Definition at line 74 of file qgraphicswidget.h.

Qt::LayoutDirection layoutDirection `[read, write]`

Search for all occurrences

Definition at line 75 of file qgraphicswidget.h.

QSizeF size `[read, write]`

Search for all occurrences

Definition at line 76 of file qgraphicswidget.h.

QSizeF minimumSize `[read, write]`

Search for all occurrences

Definition at line 77 of file qgraphicswidget.h.

QSizeF preferredSize `[read, write]`

Search for all occurrences

Definition at line 78 of file qgraphicswidget.h.

QSizeF maximumSize `[read, write]`

Search for all occurrences

Definition at line 79 of file qgraphicswidget.h.

QSizePolicy sizePolicy `[read, write]`

Search for all occurrences

Definition at line 80 of file qgraphicswidget.h.

Qt::FocusPolicy focusPolicy `[read, write]`

Search for all occurrences

Definition at line 81 of file qgraphicswidget.h.

Qt::WindowFlags windowFlags `[read, write]`

Search for all occurrences

Definition at line 82 of file qgraphicswidget.h.

QString windowTitle `[read, write]`

Search for all occurrences

Definition at line 83 of file qgraphicswidget.h.

QRectF geometry `[read, write]`

Search for all occurrences

Definition at line 84 of file qgraphicswidget.h.

bool autoFillBackground `[read, write]`

Search for all occurrences

Definition at line 85 of file qgraphicswidget.h.

QGraphicsLayout layout `[read, write]`

Search for all occurrences

Definition at line 86 of file qgraphicswidget.h.

The documentation for this class was generated from the following file:

- QtGui/qgraphicswidget.h

QGraphicsWidget QGraphicsWidget QGraphicsWidget QGraphicsWidget QGraphicsWidget QGraphicsWidget QGraphicsWidget QGraphicsWidget QGraphicsWidget QGraphicsWidget
QGraphicsWidget QGraphicsWidget QGraphicsWidget QGraphicsWidget QGraphicsWidget QGraphicsWidget QGraphicsWidget QGraphicsWidget QGraphicsWidget QGraphicsWidget