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

- Class List
- Class Hierarchy
- Class Members

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

# QGraphicsView Class Reference

Search for all occurrences

## Detailed Description

Definition at line 64 of file qgraphicsview.h.

`#include <qgraphicsview.h>`

Inheritance diagram for QGraphicsView:
[legend]

List of all members.

## Public Types
enum | ViewportAnchor { NoAnchor, AnchorViewCenter, AnchorUnderMouse }
enum | CacheModeFlag { CacheNone = 0x0, CacheBackground = 0x1 }
enum | DragMode { NoDrag, ScrollHandDrag, RubberBandDrag }
enum | ViewportUpdateMode { FullViewportUpdate, MinimalViewportUpdate, SmartViewportUpdate, NoViewportUpdate, BoundingRectViewportUpdate }
enum | OptimizationFlag { DontClipPainter = 0x1, DontSavePainterState = 0x2, DontAdjustForAntialiasing = 0x4, IndirectPainting = 0x8 }
## Public Slots
void | updateScene (const QList< QRectF > &rects)
void | invalidateScene (const QRectF &rect=QRectF(), QGraphicsScene::SceneLayers layers=QGraphicsScene::AllLayers)
void | updateSceneRect (const QRectF &rect)
## Public Member Functions
| QGraphicsView (QWidget *parent=0)
| QGraphicsView (QGraphicsScene *scene, QWidget *parent=0)
| ~QGraphicsView ()
QSize | sizeHint () const
QPainter::RenderHints | renderHints () const
void | setRenderHint (QPainter::RenderHint hint, bool enabled=true)
void | setRenderHints (QPainter::RenderHints hints)
Qt::Alignment | alignment () const
void | setAlignment (Qt::Alignment alignment)
ViewportAnchor | transformationAnchor () const
void | setTransformationAnchor (ViewportAnchor anchor)
ViewportAnchor | resizeAnchor () const
void | setResizeAnchor (ViewportAnchor anchor)
ViewportUpdateMode | viewportUpdateMode () const
void | setViewportUpdateMode (ViewportUpdateMode mode)
OptimizationFlags | optimizationFlags () const
void | setOptimizationFlag (OptimizationFlag flag, bool enabled=true)
void | setOptimizationFlags (OptimizationFlags flags)
DragMode | dragMode () const
void | setDragMode (DragMode mode)
Qt::ItemSelectionMode | rubberBandSelectionMode () const
void | setRubberBandSelectionMode (Qt::ItemSelectionMode mode)
CacheMode | cacheMode () const
void | setCacheMode (CacheMode mode)
void | resetCachedContent ()
bool | isInteractive () const
void | setInteractive (bool allowed)
QGraphicsScene * | scene () const
void | setScene (QGraphicsScene *scene)
QRectF | sceneRect () const
void | setSceneRect (const QRectF &rect)
void | setSceneRect (qreal x, qreal y, qreal w, qreal h)
QMatrix | matrix () const
void | setMatrix (const QMatrix &matrix, bool combine=false)
void | resetMatrix ()
QTransform | transform () const
QTransform | viewportTransform () const
bool | isTransformed () const
void | setTransform (const QTransform &matrix, bool combine=false)
void | resetTransform ()
void | rotate (qreal angle)
void | scale (qreal sx, qreal sy)
void | shear (qreal sh, qreal sv)
void | translate (qreal dx, qreal dy)
void | centerOn (const QPointF &pos)
void | centerOn (qreal x, qreal y)
void | centerOn (const QGraphicsItem *item)
void | ensureVisible (const QRectF &rect, int xmargin=50, int ymargin=50)
void | ensureVisible (qreal x, qreal y, qreal w, qreal h, int xmargin=50, int ymargin=50)
void | ensureVisible (const QGraphicsItem *item, int xmargin=50, int ymargin=50)
void | fitInView (const QRectF &rect, Qt::AspectRatioMode aspectRadioMode=Qt::IgnoreAspectRatio)
void | fitInView (qreal x, qreal y, qreal w, qreal h, Qt::AspectRatioMode aspectRadioMode=Qt::IgnoreAspectRatio)
void | fitInView (const QGraphicsItem *item, Qt::AspectRatioMode aspectRadioMode=Qt::IgnoreAspectRatio)
void | render (QPainter *painter, const QRectF &target=QRectF(), const QRect &source=QRect(), Qt::AspectRatioMode aspectRatioMode=Qt::KeepAspectRatio)
QList< QGraphicsItem * > | items () const
QList< QGraphicsItem * > | items (const QPoint &pos) const
QList< QGraphicsItem * > | items (int x, int y) const
QList< QGraphicsItem * > | items (const QRect &rect, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape) const
QList< QGraphicsItem * > | items (int x, int y, int w, int h, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape) const
QList< QGraphicsItem * > | items (const QPolygon &polygon, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape) const
QList< QGraphicsItem * > | items (const QPainterPath &path, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape) const
QGraphicsItem * | itemAt (const QPoint &pos) const
QGraphicsItem * | itemAt (int x, int y) const
QPointF | mapToScene (const QPoint &point) const
QPolygonF | mapToScene (const QRect &rect) const
QPolygonF | mapToScene (const QPolygon &polygon) const
QPainterPath | mapToScene (const QPainterPath &path) const
QPoint | mapFromScene (const QPointF &point) const
QPolygon | mapFromScene (const QRectF &rect) const
QPolygon | mapFromScene (const QPolygonF &polygon) const
QPainterPath | mapFromScene (const QPainterPath &path) const
QPointF | mapToScene (int x, int y) const
QPolygonF | mapToScene (int x, int y, int w, int h) const
QPoint | mapFromScene (qreal x, qreal y) const
QPolygon | mapFromScene (qreal x, qreal y, qreal w, qreal h) const
QVariant | inputMethodQuery (Qt::InputMethodQuery query) const
QBrush | backgroundBrush () const
void | setBackgroundBrush (const QBrush &brush)
QBrush | foregroundBrush () const
void | setForegroundBrush (const QBrush &brush)
## Protected Slots
void | setupViewport (QWidget *widget)
## Protected Member Functions
| QGraphicsView (QGraphicsViewPrivate &, QWidget *parent=0)
bool | event (QEvent *event)
bool | viewportEvent (QEvent *event)
void | contextMenuEvent (QContextMenuEvent *event)
void | dragEnterEvent (QDragEnterEvent *event)
void | dragLeaveEvent (QDragLeaveEvent *event)
void | dragMoveEvent (QDragMoveEvent *event)
void | dropEvent (QDropEvent *event)
void | focusInEvent (QFocusEvent *event)
bool | focusNextPrevChild (bool next)
void | focusOutEvent (QFocusEvent *event)
void | keyPressEvent (QKeyEvent *event)
void | keyReleaseEvent (QKeyEvent *event)
void | mouseDoubleClickEvent (QMouseEvent *event)
void | mousePressEvent (QMouseEvent *event)
void | mouseMoveEvent (QMouseEvent *event)
void | mouseReleaseEvent (QMouseEvent *event)
void | wheelEvent (QWheelEvent *event)
void | paintEvent (QPaintEvent *event)
void | resizeEvent (QResizeEvent *event)
void | scrollContentsBy (int dx, int dy)
void | showEvent (QShowEvent *event)
void | inputMethodEvent (QInputMethodEvent *event)
virtual void | drawBackground (QPainter *painter, const QRectF &rect)
virtual void | drawForeground (QPainter *painter, const QRectF &rect)
virtual void | drawItems (QPainter *painter, int numItems, QGraphicsItem *items[], const QStyleOptionGraphicsItem options[])
## Properties
QBrush | backgroundBrush
QBrush | foregroundBrush
bool | interactive
QRectF | sceneRect
Qt::Alignment | alignment
QPainter::RenderHints | renderHints
DragMode | dragMode
CacheMode | cacheMode
ViewportAnchor | transformationAnchor
ViewportAnchor | resizeAnchor
ViewportUpdateMode | viewportUpdateMode
Qt::ItemSelectionMode | rubberBandSelectionMode
OptimizationFlags | optimizationFlags
## Friends
class | QGraphicsScene
class | QGraphicsScenePrivate
class | QGraphicsItemPrivate

## Member Enumeration Documentation

enum ViewportAnchor

Search for all occurrences

Enumerator:

  NoAnchor | Search for all occurrences
  AnchorViewCenter | Search for all occurrences
  AnchorUnderMouse | Search for all occurrences

Definition at line 86 of file qgraphicsview.h.

                            {
            NoAnchor,
            AnchorViewCenter,
            AnchorUnderMouse
        };

enum CacheModeFlag

Search for all occurrences

Enumerator:

  CacheNone | Search for all occurrences
  CacheBackground | Search for all occurrences

Definition at line 92 of file qgraphicsview.h.

                           {
            CacheNone = 0x0,
            CacheBackground = 0x1
        };

enum DragMode

Search for all occurrences

Enumerator:

  NoDrag | Search for all occurrences
  ScrollHandDrag | Search for all occurrences
  RubberBandDrag | Search for all occurrences

Definition at line 98 of file qgraphicsview.h.

                      {
            NoDrag,
            ScrollHandDrag,
            RubberBandDrag
        };

enum ViewportUpdateMode

Search for all occurrences

Enumerator:

  FullViewportUpdate | Search for all occurrences
  MinimalViewportUpdate | Search for all occurrences
  SmartViewportUpdate | Search for all occurrences
  NoViewportUpdate | Search for all occurrences
  BoundingRectViewportUpdate | Search for all occurrences

Definition at line 104 of file qgraphicsview.h.

                                {
            FullViewportUpdate,
            MinimalViewportUpdate,
            SmartViewportUpdate,
            NoViewportUpdate,
            BoundingRectViewportUpdate
        };

enum OptimizationFlag

Search for all occurrences

Enumerator:

  DontClipPainter | Search for all occurrences
  DontSavePainterState | Search for all occurrences
  DontAdjustForAntialiasing | Search for all occurrences
  IndirectPainting | Search for all occurrences

Definition at line 112 of file qgraphicsview.h.

                              {
            DontClipPainter = 0x1, // obsolete
            DontSavePainterState = 0x2,
            DontAdjustForAntialiasing = 0x4,
            IndirectPainting = 0x8
        };

## Constructor & Destructor Documentation

QGraphicsView | ( | QWidget * | parent = `0` | ) |

QGraphicsView | ( | QGraphicsScene * | scene,
|  | QWidget * | parent = `0`
| ) |  |

~QGraphicsView | ( |  | ) |

QGraphicsView | ( | QGraphicsViewPrivate & | ,
|  | QWidget * | parent = `0`
| ) |  | `[protected]`

## Member Function Documentation

QSize sizeHint | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractScrollArea.

QPainter::RenderHints renderHints | ( |  | ) | const

Search for all occurrences

void setRenderHint | ( | QPainter::RenderHint | hint,
|  | bool | enabled = `true`
| ) |  |

Search for all occurrences

void setRenderHints | ( | QPainter::RenderHints | hints | ) |

Search for all occurrences

Qt::Alignment alignment | ( |  | ) | const

Search for all occurrences

void setAlignment | ( | Qt::Alignment | alignment | ) |

Search for all occurrences

ViewportAnchor transformationAnchor | ( |  | ) | const

Search for all occurrences

void setTransformationAnchor | ( | ViewportAnchor | anchor | ) |

Search for all occurrences

ViewportAnchor resizeAnchor | ( |  | ) | const

Search for all occurrences

void setResizeAnchor | ( | ViewportAnchor | anchor | ) |

Search for all occurrences

ViewportUpdateMode viewportUpdateMode | ( |  | ) | const

Search for all occurrences

void setViewportUpdateMode | ( | ViewportUpdateMode | mode | ) |

Search for all occurrences

OptimizationFlags optimizationFlags | ( |  | ) | const

Search for all occurrences

void setOptimizationFlag | ( | OptimizationFlag | flag,
|  | bool | enabled = `true`
| ) |  |

Search for all occurrences

void setOptimizationFlags | ( | OptimizationFlags | flags | ) |

Search for all occurrences

DragMode dragMode | ( |  | ) | const

Search for all occurrences

void setDragMode | ( | DragMode | mode | ) |

Search for all occurrences

Qt::ItemSelectionMode rubberBandSelectionMode | ( |  | ) | const

Search for all occurrences

void setRubberBandSelectionMode | ( | Qt::ItemSelectionMode | mode | ) |

Search for all occurrences

CacheMode cacheMode | ( |  | ) | const

Search for all occurrences

void setCacheMode | ( | CacheMode | mode | ) |

Search for all occurrences

void resetCachedContent | ( |  | ) |

Search for all occurrences

bool isInteractive | ( |  | ) | const

Search for all occurrences

void setInteractive | ( | bool | allowed | ) |

Search for all occurrences

QGraphicsScene* scene | ( |  | ) | const

Search for all occurrences

void setScene | ( | QGraphicsScene * | scene | ) |

Search for all occurrences

QRectF sceneRect | ( |  | ) | const

Search for all occurrences

void setSceneRect | ( | const QRectF & | rect | ) |

Search for all occurrences

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

Search for all occurrences

Definition at line 287 of file qgraphicsview.h.

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

QMatrix matrix | ( |  | ) | const

Search for all occurrences

void setMatrix | ( | const QMatrix & | matrix,
|  | bool | combine = `false`
| ) |  |

Search for all occurrences

void resetMatrix | ( |  | ) |

Search for all occurrences

QTransform transform | ( |  | ) | const

Search for all occurrences

QTransform viewportTransform | ( |  | ) | const

Search for all occurrences

bool isTransformed | ( |  | ) | const

Search for all occurrences

void setTransform | ( | const QTransform & | matrix,
|  | bool | combine = `false`
| ) |  |

Search for all occurrences

void resetTransform | ( |  | ) |

Search for all occurrences

void rotate | ( | qreal | angle | ) |

Search for all occurrences

void scale | ( | qreal | sx,
|  | qreal | sy
| ) |  |

Search for all occurrences

void shear | ( | qreal | sh,
|  | qreal | sv
| ) |  |

Search for all occurrences

void translate | ( | qreal | dx,
|  | qreal | dy
| ) |  |

Search for all occurrences

void centerOn | ( | const QPointF & | pos | ) |

Search for all occurrences

void centerOn | ( | qreal | x,
|  | qreal | y
| ) |  | `[inline]`

Search for all occurrences

Definition at line 289 of file qgraphicsview.h.

    { centerOn(QPointF(ax, ay)); }

void centerOn | ( | const QGraphicsItem * | item | ) |

Search for all occurrences

void ensureVisible | ( | const QRectF & | rect,
|  | int | xmargin = `50`,
|  | int | ymargin = `50`
| ) |  |

Search for all occurrences

void ensureVisible | ( | qreal | x,
|  | qreal | y,
|  | qreal | w,
|  | qreal | h,
|  | int | xmargin = `50`,
|  | int | ymargin = `50`
| ) |  | `[inline]`

Search for all occurrences

Definition at line 291 of file qgraphicsview.h.

    { ensureVisible(QRectF(ax, ay, aw, ah), xmargin, ymargin); }

void ensureVisible | ( | const QGraphicsItem * | item,
|  | int | xmargin = `50`,
|  | int | ymargin = `50`
| ) |  |

Search for all occurrences

void fitInView | ( | const QRectF & | rect,
|  | Qt::AspectRatioMode | aspectRadioMode = `Qt::IgnoreAspectRatio`
| ) |  |

Search for all occurrences

void fitInView | ( | qreal | x,
|  | qreal | y,
|  | qreal | w,
|  | qreal | h,
|  | Qt::AspectRatioMode | aspectRadioMode = `Qt::IgnoreAspectRatio`
| ) |  | `[inline]`

Search for all occurrences

Definition at line 293 of file qgraphicsview.h.

    { fitInView(QRectF(ax, ay, w, h), mode); }

void fitInView | ( | const QGraphicsItem * | item,
|  | Qt::AspectRatioMode | aspectRadioMode = `Qt::IgnoreAspectRatio`
| ) |  |

Search for all occurrences

void render | ( | QPainter * | painter,
|  | const QRectF & | target = `QRectF()`,
|  | const QRect & | source = `QRect()`,
|  | Qt::AspectRatioMode | aspectRatioMode = `Qt::KeepAspectRatio`
| ) |  |

Search for all occurrences

QList<QGraphicsItem *> items | ( |  | ) | const

Search for all occurrences

QList<QGraphicsItem *> items | ( | const QPoint & | pos | ) | const

Search for all occurrences

QList< QGraphicsItem * > items | ( | int | x,
|  | int | y
| ) |  | const `[inline]`

Search for all occurrences

Definition at line 295 of file qgraphicsview.h.

    { return items(QPoint(ax, ay)); }

QList<QGraphicsItem *> items | ( | const QRect & | rect,
|  | Qt::ItemSelectionMode | mode = `Qt::IntersectsItemShape`
| ) |  | const

Search for all occurrences

QList< QGraphicsItem * > items | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h,
|  | Qt::ItemSelectionMode | mode = `Qt::IntersectsItemShape`
| ) |  | const `[inline]`

Search for all occurrences

Definition at line 297 of file qgraphicsview.h.

    { return items(QRect(ax, ay, w, h), mode); }

QList<QGraphicsItem *> items | ( | const QPolygon & | polygon,
|  | Qt::ItemSelectionMode | mode = `Qt::IntersectsItemShape`
| ) |  | const

Search for all occurrences

QList<QGraphicsItem *> items | ( | const QPainterPath & | path,
|  | Qt::ItemSelectionMode | mode = `Qt::IntersectsItemShape`
| ) |  | const

Search for all occurrences

QGraphicsItem* itemAt | ( | const QPoint & | pos | ) | const

Search for all occurrences

QGraphicsItem * itemAt | ( | int | x,
|  | int | y
| ) |  | const `[inline]`

Search for all occurrences

Definition at line 299 of file qgraphicsview.h.

    { return itemAt(QPoint(ax, ay)); }

QPointF mapToScene | ( | const QPoint & | point | ) | const

Search for all occurrences

QPolygonF mapToScene | ( | const QRect & | rect | ) | const

Search for all occurrences

QPolygonF mapToScene | ( | const QPolygon & | polygon | ) | const

Search for all occurrences

QPainterPath mapToScene | ( | const QPainterPath & | path | ) | const

Search for all occurrences

QPoint mapFromScene | ( | const QPointF & | point | ) | const

Search for all occurrences

QPolygon mapFromScene | ( | const QRectF & | rect | ) | const

Search for all occurrences

QPolygon mapFromScene | ( | const QPolygonF & | polygon | ) | const

Search for all occurrences

QPainterPath mapFromScene | ( | const QPainterPath & | path | ) | const

Search for all occurrences

QPointF mapToScene | ( | int | x,
|  | int | y
| ) |  | const `[inline]`

Search for all occurrences

Definition at line 301 of file qgraphicsview.h.

    { return mapToScene(QPoint(ax, ay)); }

QPolygonF mapToScene | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h
| ) |  | const `[inline]`

Search for all occurrences

Definition at line 303 of file qgraphicsview.h.

    { return mapToScene(QRect(ax, ay, w, h)); }

QPoint mapFromScene | ( | qreal | x,
|  | qreal | y
| ) |  | const `[inline]`

Search for all occurrences

Definition at line 305 of file qgraphicsview.h.

    { return mapFromScene(QPointF(ax, ay)); }

QPolygon mapFromScene | ( | qreal | x,
|  | qreal | y,
|  | qreal | w,
|  | qreal | h
| ) |  | const `[inline]`

Search for all occurrences

Definition at line 307 of file qgraphicsview.h.

    { return mapFromScene(QRectF(ax, ay, w, h)); }

QVariant inputMethodQuery | ( | Qt::InputMethodQuery | query | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QWidget.

QBrush backgroundBrush | ( |  | ) | const

Search for all occurrences

void setBackgroundBrush | ( | const QBrush & | brush | ) |

Search for all occurrences

QBrush foregroundBrush | ( |  | ) | const

Search for all occurrences

void setForegroundBrush | ( | const QBrush & | brush | ) |

Search for all occurrences

void updateScene | ( | const QList< QRectF > & | rects | ) | `[slot]`

Search for all occurrences

void invalidateScene | ( | const QRectF & | rect = `QRectF()`,
|  | QGraphicsScene::SceneLayers | layers = `QGraphicsScene::AllLayers`
| ) |  | `[slot]`

Search for all occurrences

void updateSceneRect | ( | const QRectF & | rect | ) | `[slot]`

Search for all occurrences

void setupViewport | ( | QWidget * | widget | ) | `[protected, slot]`

Search for all occurrences

Reimplemented from QAbstractScrollArea.

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

Search for all occurrences

Reimplemented from QAbstractScrollArea.

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

Search for all occurrences

Reimplemented from QAbstractScrollArea.

void contextMenuEvent | ( | QContextMenuEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QAbstractScrollArea.

void dragEnterEvent | ( | QDragEnterEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QAbstractScrollArea.

void dragLeaveEvent | ( | QDragLeaveEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QAbstractScrollArea.

void dragMoveEvent | ( | QDragMoveEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QAbstractScrollArea.

void dropEvent | ( | QDropEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QAbstractScrollArea.

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

Search for all occurrences

Reimplemented from QWidget.

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

Search for all occurrences

Reimplemented from QWidget.

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

Search for all occurrences

Reimplemented from QWidget.

void keyPressEvent | ( | QKeyEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QAbstractScrollArea.

void keyReleaseEvent | ( | QKeyEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void mouseDoubleClickEvent | ( | QMouseEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QAbstractScrollArea.

void mousePressEvent | ( | QMouseEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QAbstractScrollArea.

void mouseMoveEvent | ( | QMouseEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QAbstractScrollArea.

void mouseReleaseEvent | ( | QMouseEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QAbstractScrollArea.

void wheelEvent | ( | QWheelEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QAbstractScrollArea.

void paintEvent | ( | QPaintEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QAbstractScrollArea.

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

Search for all occurrences

Reimplemented from QAbstractScrollArea.

void scrollContentsBy | ( | int | dx,
|  | int | dy
| ) |  | `[protected, virtual]`

Search for all occurrences

Reimplemented from QAbstractScrollArea.

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

Search for all occurrences

Reimplemented from QWidget.

void inputMethodEvent | ( | QInputMethodEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

virtual void drawBackground | ( | QPainter * | painter,
|  | const QRectF & | rect
| ) |  | `[protected, virtual]`

Search for all occurrences

virtual void drawForeground | ( | QPainter * | painter,
|  | const QRectF & | rect
| ) |  | `[protected, virtual]`

Search for all occurrences

virtual void drawItems | ( | QPainter * | painter,
|  | int | numItems,
|  | QGraphicsItem * | items[],
|  | const QStyleOptionGraphicsItem | options[]
| ) |  | `[protected, virtual]`

Search for all occurrences

## Friends And Related Function Documentation

friend class QGraphicsScene `[friend]`

Search for all occurrences

Definition at line 279 of file qgraphicsview.h.

friend class QGraphicsScenePrivate `[friend]`

Search for all occurrences

Definition at line 280 of file qgraphicsview.h.

friend class QGraphicsItemPrivate `[friend]`

Search for all occurrences

Definition at line 281 of file qgraphicsview.h.

## Property Documentation

QBrush backgroundBrush `[read, write]`

Search for all occurrences

Definition at line 69 of file qgraphicsview.h.

QBrush foregroundBrush `[read, write]`

Search for all occurrences

Definition at line 70 of file qgraphicsview.h.

bool interactive `[read, write]`

Search for all occurrences

Definition at line 71 of file qgraphicsview.h.

QRectF sceneRect `[read, write]`

Search for all occurrences

Definition at line 72 of file qgraphicsview.h.

Qt::Alignment alignment `[read, write]`

Search for all occurrences

Definition at line 73 of file qgraphicsview.h.

QPainter::RenderHints renderHints `[read, write]`

Search for all occurrences

Definition at line 74 of file qgraphicsview.h.

DragMode dragMode `[read, write]`

Search for all occurrences

Definition at line 75 of file qgraphicsview.h.

CacheMode cacheMode `[read, write]`

Search for all occurrences

Definition at line 76 of file qgraphicsview.h.

ViewportAnchor transformationAnchor `[read, write]`

Search for all occurrences

Definition at line 77 of file qgraphicsview.h.

ViewportAnchor resizeAnchor `[read, write]`

Search for all occurrences

Definition at line 78 of file qgraphicsview.h.

ViewportUpdateMode viewportUpdateMode `[read, write]`

Search for all occurrences

Definition at line 79 of file qgraphicsview.h.

Qt::ItemSelectionMode rubberBandSelectionMode `[read, write]`

Search for all occurrences

Definition at line 81 of file qgraphicsview.h.

OptimizationFlags optimizationFlags `[read, write]`

Search for all occurrences

Definition at line 83 of file qgraphicsview.h.

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

- QtGui/qgraphicsview.h

QGraphicsView QGraphicsView QGraphicsView QGraphicsView QGraphicsView QGraphicsView QGraphicsView QGraphicsView QGraphicsView QGraphicsView
QGraphicsView QGraphicsView QGraphicsView QGraphicsView QGraphicsView QGraphicsView QGraphicsView QGraphicsView QGraphicsView QGraphicsView