Skip to content

PythonQt.QtGui.QGraphicsView · declarations 003

Back to PythonQt.QtGui.QGraphicsView

setAlignment

setAlignment(alignment: Any) -> None

X.setAlignment(alignment)

Upstream PySide2 reference signatures (binding differences may apply):

setAlignment(self, alignment: PySide2.QtCore.Qt.Alignment) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setAlignment

setBackgroundBrush

setBackgroundBrush(brush: Any) -> None

X.setBackgroundBrush(brush)

Upstream PySide2 reference signatures (binding differences may apply):

setBackgroundBrush(self, brush: PySide2.QtGui.QBrush) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setBackgroundBrush

setCacheMode

setCacheMode(mode: Any) -> None

X.setCacheMode(mode)

Upstream PySide2 reference signatures (binding differences may apply):

setCacheMode(self, mode: PySide2.QtWidgets.QGraphicsView.CacheMode) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setCacheMode

setDragMode

setDragMode(mode: Any) -> None

X.setDragMode(mode)

Upstream PySide2 reference signatures (binding differences may apply):

setDragMode(self, mode: PySide2.QtWidgets.QGraphicsView.DragMode) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setDragMode

setForegroundBrush

setForegroundBrush(brush: Any) -> None

X.setForegroundBrush(brush)

Upstream PySide2 reference signatures (binding differences may apply):

setForegroundBrush(self, brush: PySide2.QtGui.QBrush) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setForegroundBrush

setInteractive

setInteractive(allowed: bool) -> None

X.setInteractive(allowed)

Upstream PySide2 reference signatures (binding differences may apply):

setInteractive(self, allowed: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setInteractive

setMatrix

setMatrix(matrix: Any, combine: bool) -> None

X.setMatrix(matrix, combine)

Upstream PySide2 reference signatures (binding differences may apply):

setMatrix(self, matrix: PySide2.QtGui.QMatrix, combine: bool=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setMatrix

setOptimizationFlag

setOptimizationFlag(arg0: flag, enabled: bool) -> None

X.setOptimizationFlag(flag, enabled)

Supplemental documentation: Qt 5 reference:

void QGraphicsView::setOptimizationFlag(QGraphicsView::OptimizationFlag flag, bool enabled \= true)

Enables flag if enabled is true; otherwise disables flag.

See also optimizationFlags.

Upstream PySide2 reference signatures (binding differences may apply):

setOptimizationFlag(self, flag: PySide2.QtWidgets.QGraphicsView.OptimizationFlag, enabled: bool=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setOptimizationFlag

setOptimizationFlags

setOptimizationFlags(arg0: flags) -> None

X.setOptimizationFlags(flags)

Upstream PySide2 reference signatures (binding differences may apply):

setOptimizationFlags(self, flags: PySide2.QtWidgets.QGraphicsView.OptimizationFlags) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setOptimizationFlags

setRenderHint

setRenderHint(hint: Any, enabled: bool) -> None

X.setRenderHint(hint, enabled)

Supplemental documentation: Qt 5 reference:

void QGraphicsView::setRenderHint(QPainter::RenderHint hint, bool enabled \= true)

If enabled is true, the render hint hint is enabled; otherwise it is disabled.

See also renderHints.

Upstream PySide2 reference signatures (binding differences may apply):

setRenderHint(self, hint: PySide2.QtGui.QPainter.RenderHint, enabled: bool=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setRenderHint

setRenderHints

setRenderHints(hints: Any) -> None

X.setRenderHints(hints)

Upstream PySide2 reference signatures (binding differences may apply):

setRenderHints(self, hints: PySide2.QtGui.QPainter.RenderHints) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setRenderHints

setResizeAnchor

setResizeAnchor(anchor: Any) -> None

X.setResizeAnchor(anchor)

Upstream PySide2 reference signatures (binding differences may apply):

setResizeAnchor(self, anchor: PySide2.QtWidgets.QGraphicsView.ViewportAnchor) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setResizeAnchor

setRubberBandSelectionMode

setRubberBandSelectionMode(mode: Any) -> None

X.setRubberBandSelectionMode(mode)

Upstream PySide2 reference signatures (binding differences may apply):

setRubberBandSelectionMode(self, mode: PySide2.QtCore.Qt.ItemSelectionMode) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setRubberBandSelectionMode

setScene

setScene(scene: Any) -> None

X.setScene(scene)

Supplemental documentation: Qt 5 reference:

void QGraphicsView::setScene(QGraphicsScene *scene)

Sets the current scene to scene. If scene is already being viewed, this function does nothing.

When a scene is set on a view, the QGraphicsScene::changed() signal is automatically connected to this view's updateScene() slot, and the view's scroll bars are adjusted to fit the size of the scene.

The view does not take ownership of scene.

See also scene().

Upstream PySide2 reference signatures (binding differences may apply):

setScene(self, scene: PySide2.QtWidgets.QGraphicsScene) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setScene

setSceneRect

setSceneRect(x: Any, y: Any, w: Any, h: Any) -> None

X.setSceneRect(x, y, w, h)

Upstream PySide2 reference signatures (binding differences may apply):

setSceneRect(self, rect: PySide2.QtCore.QRectF) -> None
setSceneRect(self, x: float, y: float, w: float, h: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setSceneRect

setTransform

setTransform(matrix: Any, combine: bool) -> None

X.setTransform(matrix, combine)

Supplemental documentation: Qt 5 reference:

void QGraphicsView::setTransform(const QTransform \&matrix, bool combine \= false)

Sets the view's current transformation matrix to matrix.

If combine is true, then matrix is combined with the current matrix; otherwise, matrix replaces the current matrix. combine is false by default.

The transformation matrix transforms the scene into view coordinates. Using the default transformation, provided by the identity matrix, one pixel in the view represents one unit in the scene (e.g., a 10x10 rectangular item is drawn using 10x10 pixels in the view). If a 2x2 scaling matrix is applied, the scene will be drawn in 1:2 (e.g., a 10x10 rectangular item is then drawn using 20x20 pixels in the view).

Example:

QGraphicsScene scene;
scene.addText("GraphicsView rotated clockwise");

QGraphicsView view(&scene);
view.rotate(90); // the text is rendered with a 90 degree clockwise rotation
view.show();

To simplify interation with items using a transformed view, QGraphicsView provides mapTo... and mapFrom... functions that can translate between scene and view coordinates. For example, you can call mapToScene() to map a view coordinate to a floating point scene coordinate, or mapFromScene() to map from floating point scene coordinates to view coordinates.

See also transform(), rotate(), scale(), shear(), and translate().

Upstream PySide2 reference signatures (binding differences may apply):

setTransform(self, matrix: PySide2.QtGui.QTransform, combine: bool=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setTransform

setTransformationAnchor

setTransformationAnchor(anchor: Any) -> None

X.setTransformationAnchor(anchor)

Upstream PySide2 reference signatures (binding differences may apply):

setTransformationAnchor(self, anchor: PySide2.QtWidgets.QGraphicsView.ViewportAnchor) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setTransformationAnchor

setViewportUpdateMode

setViewportUpdateMode(mode: Any) -> None

X.setViewportUpdateMode(mode)

Upstream PySide2 reference signatures (binding differences may apply):

setViewportUpdateMode(self, mode: PySide2.QtWidgets.QGraphicsView.ViewportUpdateMode) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setViewportUpdateMode

setupViewport

setupViewport(widget: Any) -> None

X.setupViewport(widget)

Supplemental documentation: Qt 5 reference:

[override virtual protected slot] void QGraphicsView::setupViewport(QWidget *widget)

Reimplements: QAbstractScrollArea::setupViewport(QWidget *viewport).

This slot is called by QAbstractScrollArea after setViewport() has been called. Reimplement this function in a subclass of QGraphicsView to initialize the new viewport widget before it is used.

See also setViewport().

Upstream PySide2 reference signatures (binding differences may apply):

setupViewport(self, widget: PySide2.QtWidgets.QWidget) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#setupViewport

shear

shear(sh: float, sv: float) -> None

X.shear(sh, sv)

Supplemental documentation: Qt 5 reference:

void QGraphicsView::shear(qreal sh, qreal sv)

Shears the current view transformation by (sh, sv).

See also setTransform(), transform(), rotate(), scale(), and translate().

Upstream PySide2 reference signatures (binding differences may apply):

shear(self, sh: float, sv: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#shear

showEvent

showEvent(event: Any) -> None

X.showEvent(event)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QGraphicsView::showEvent(QShowEvent *event)

Reimplements: QWidget::showEvent(QShowEvent *event).

Upstream PySide2 reference signatures (binding differences may apply):

showEvent(self, event: PySide2.QtGui.QShowEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#showEvent

sizeHint instance-attribute

sizeHint: QSize

Qt 5 reference:

[override virtual] QSize QGraphicsView::sizeHint() const

Reimplements: QAbstractScrollArea::sizeHint() const.

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#sizeHint

transform

transform() -> Any

X.transform() -> PythonQt.QtGui.QTransform

Supplemental documentation: Qt 5 reference:

QTransform QGraphicsView::transform() const

Returns the current transformation matrix for the view. If no current transformation is set, the identity matrix is returned.

See also setTransform(), rotate(), scale(), shear(), and translate().

Upstream PySide2 reference signatures (binding differences may apply):

transform(self) -> PySide2.QtGui.QTransform

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#transform

transformationAnchor instance-attribute

transformationAnchor: Any

Qt 5 reference:

transformationAnchor : ViewportAnchor

how the view should position the scene during transformations.

QGraphicsView uses this property to decide how to position the scene in the viewport when the transformation matrix changes, and the coordinate system of the view is transformed. The default behavior, AnchorViewCenter, ensures that the scene point at the center of the view remains unchanged during transformations (e.g., when rotating, the scene will appear to rotate around the center of the view).

Note that the effect of this property is noticeable when only a part of the scene is visible (i.e., when there are scroll bars). Otherwise, if the whole scene fits in the view, QGraphicsScene uses the view alignment to position the scene in the view.

Access functions:

QGraphicsView::ViewportAnchor transformationAnchor() const
void setTransformationAnchor(QGraphicsView::ViewportAnchor anchor)

See also alignment and resizeAnchor.

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#transformationAnchor

translate

translate(dx: float, dy: float) -> None

X.translate(dx, dy)

Supplemental documentation: Qt 5 reference:

void QGraphicsView::translate(qreal dx, qreal dy)

Translates the current view transformation by (dx, dy).

See also setTransform(), transform(), rotate(), and shear().

Upstream PySide2 reference signatures (binding differences may apply):

translate(self, dx: float, dy: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#translate

updateScene

updateScene(rects: Any) -> None

X.updateScene(rects)

Supplemental documentation: Qt 5 reference:

[slot] void QGraphicsView::updateScene(const QList\<QRectF> \&rects)

Schedules an update of the scene rectangles rects.

See also QGraphicsScene::changed().

Upstream PySide2 reference signatures (binding differences may apply):

updateScene(self, rects: typing.Sequence[PySide2.QtCore.QRectF]) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#updateScene

updateSceneRect

updateSceneRect(rect: Any) -> None

X.updateSceneRect(rect)

Supplemental documentation: Qt 5 reference:

[slot] void QGraphicsView::updateSceneRect(const QRectF \&rect)

Notifies QGraphicsView that the scene's scene rect has changed. rect is the new scene rect. If the view already has an explicitly set scene rect, this function does nothing.

See also sceneRect and QGraphicsScene::sceneRectChanged().

Upstream PySide2 reference signatures (binding differences may apply):

updateSceneRect(self, rect: PySide2.QtCore.QRectF) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#updateSceneRect

viewportEvent

viewportEvent(event: Any) -> bool

X.viewportEvent(event) -> bool

Supplemental documentation: Qt 5 reference:

[override virtual protected] bool QGraphicsView::viewportEvent(QEvent *event)

Reimplements: QAbstractScrollArea::viewportEvent(QEvent *event).

Upstream PySide2 reference signatures (binding differences may apply):

viewportEvent(self, event: PySide2.QtCore.QEvent) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#viewportEvent

viewportTransform

viewportTransform() -> Any

X.viewportTransform() -> PythonQt.QtGui.QTransform

Supplemental documentation: Qt 5 reference:

QTransform QGraphicsView::viewportTransform() const

Returns a matrix that maps scene coordinates to viewport coordinates.

See also mapToScene() and mapFromScene().

Upstream PySide2 reference signatures (binding differences may apply):

viewportTransform(self) -> PySide2.QtGui.QTransform

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#viewportTransform

viewportUpdateMode instance-attribute

viewportUpdateMode: Any

Qt 5 reference:

viewportUpdateMode : ViewportUpdateMode

how the viewport should update its contents.

QGraphicsView uses this property to decide how to update areas of the scene that have been reexposed or changed. Usually you do not need to modify this property, but there are some cases where doing so can improve rendering performance. See the ViewportUpdateMode documentation for specific details.

The default value is MinimalViewportUpdate, where QGraphicsView will update as small an area of the viewport as possible when the contents change.

This property was introduced in Qt 4.3.

Access functions:

QGraphicsView::ViewportUpdateMode viewportUpdateMode() const
void setViewportUpdateMode(QGraphicsView::ViewportUpdateMode mode)

See also ViewportUpdateMode and cacheMode.

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#viewportUpdateMode

wheelEvent

wheelEvent(event: Any) -> None

X.wheelEvent(event)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QGraphicsView::wheelEvent(QWheelEvent *event)

Reimplements: QAbstractScrollArea::wheelEvent(QWheelEvent *e).

Upstream PySide2 reference signatures (binding differences may apply):

wheelEvent(self, event: PySide2.QtGui.QWheelEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qgraphicsview.html#wheelEvent

windowIconChanged

windowIconChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGraphicsView.windowIconChanged; argument details are not documented.

windowIconTextChanged

windowIconTextChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGraphicsView.windowIconTextChanged; argument details are not documented.

windowTitleChanged

windowTitleChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QGraphicsView.windowTitleChanged; argument details are not documented.