PythonQt.QtGui.QGraphicsScene · declarations 003
Back to PythonQt.QtGui.QGraphicsScene
setActiveWindow
setActiveWindow(widget: Any) -> None
X.setActiveWindow(widget)
Supplemental documentation: Qt 5 reference:
void QGraphicsScene::setActiveWindow(QGraphicsWidget *widget)
Activates widget, which must be a widget in this scene. You can also pass 0 for widget, in which case QGraphicsScene will deactivate any currently active window.
This function was introduced in Qt 4.4.
See also activeWindow() and QGraphicsWidget::isActiveWindow().
Upstream PySide2 reference signatures (binding differences may apply):
setActiveWindow(self, widget: PySide2.QtWidgets.QGraphicsWidget) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#setActiveWindow
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/qgraphicsscene.html#setBackgroundBrush
setBspTreeDepth
setBspTreeDepth(depth: int) -> None
X.setBspTreeDepth(depth)
Upstream PySide2 reference signatures (binding differences may apply):
setBspTreeDepth(self, depth: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#setBspTreeDepth
setFocus
setFocus(focusReason: Any) -> None
X.setFocus(focusReason)
Supplemental documentation: Qt 5 reference:
void QGraphicsScene::setFocus(Qt::FocusReason focusReason \= Qt::OtherFocusReason)
Sets focus on the scene by sending a QFocusEvent to the scene, passing focusReason as the reason. If the scene regains focus after having previously lost it while an item had focus, the last focus item will receive focus with focusReason as the reason.
If the scene already has focus, this function does nothing.
See also hasFocus(), clearFocus(), and setFocusItem().
Upstream PySide2 reference signatures (binding differences may apply):
setFocus(self, focusReason: PySide2.QtCore.Qt.FocusReason=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#setFocus
setFocusItem
setFocusItem(item: Any, focusReason: Any) -> None
X.setFocusItem(item, focusReason)
Supplemental documentation: Qt 5 reference:
void QGraphicsScene::setFocusItem(QGraphicsItem *item, Qt::FocusReason focusReason \= Qt::OtherFocusReason)
Sets the scene's focus item to item, with the focus reason focusReason, after removing focus from any previous item that may have had focus.
If item is nullptr, or if it either does not accept focus (i.e., it does not have
the
QGraphicsItem::ItemIsFocusable
flag enabled), or is not visible or not enabled, this function only removes focus from
any previous focusitem.
If item is not nullptr, and the scene does not currently have focus (i.e.,
hasFocus() returns
false), this function will call
setFocus()
automatically.
See also focusItem(), hasFocus(), and setFocus().
Upstream PySide2 reference signatures (binding differences may apply):
setFocusItem(self, item: PySide2.QtWidgets.QGraphicsItem, focusReason: PySide2.QtCore.Qt.FocusReason=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#setFocusItem
setFont
setFont(font: Any) -> None
X.setFont(font)
Upstream PySide2 reference signatures (binding differences may apply):
setFont(self, font: PySide2.QtGui.QFont) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#setFont
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/qgraphicsscene.html#setForegroundBrush
setItemIndexMethod
setItemIndexMethod(method: Any) -> None
X.setItemIndexMethod(method)
Upstream PySide2 reference signatures (binding differences may apply):
setItemIndexMethod(self, method: PySide2.QtWidgets.QGraphicsScene.ItemIndexMethod) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#setItemIndexMethod
setMinimumRenderSize
setMinimumRenderSize(minSize: float) -> None
X.setMinimumRenderSize(minSize)
Upstream PySide2 reference signatures (binding differences may apply):
setMinimumRenderSize(self, minSize: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#setMinimumRenderSize
setPalette
setPalette(palette: Any) -> None
X.setPalette(palette)
Upstream PySide2 reference signatures (binding differences may apply):
setPalette(self, palette: PySide2.QtGui.QPalette) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#setPalette
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/qgraphicsscene.html#setSceneRect
setSelectionArea
setSelectionArea(path: Any, selectionOperation: Any, mode: Any, deviceTransform: Any) -> None
X.setSelectionArea(path, selectionOperation, mode, deviceTransform)
Supplemental documentation: Qt 5 reference:
void QGraphicsScene::setSelectionArea(const QPainterPath \&path, const QTransform \&deviceTransform)
Sets the selection area to path. All items within this area are immediately selected, and all items outside are unselected. You can get the list of all selected items by calling selectedItems().
deviceTransform is the transformation that applies to the view, and needs to be provided if the scene contains items that ignore transformations.
For an item to be selected, it must be marked as selectable (QGraphicsItem::ItemIsSelectable).
This function was introduced in Qt 4.6.
See also clearSelection() and selectionArea().
void QGraphicsScene::setSelectionArea(const QPainterPath \&path, Qt::ItemSelectionMode mode \= Qt::IntersectsItemShape, const QTransform \&deviceTransform \= QTransform())
This is an overloaded function.
Sets the selection area to path using mode to determine if items are included in the selection area.
deviceTransform is the transformation that applies to the view, and needs to be provided if the scene contains items that ignore transformations.
This function was introduced in Qt 4.6.
See also clearSelection() and selectionArea().
void QGraphicsScene::setSelectionArea(const QPainterPath \&path, Qt::ItemSelectionOperation selectionOperation, Qt::ItemSelectionMode mode \= Qt::IntersectsItemShape, const QTransform \&deviceTransform \= QTransform())
This is an overloaded function.
Sets the selection area to path using mode to determine if items are included in the selection area.
deviceTransform is the transformation that applies to the view, and needs to be provided if the scene contains items that ignore transformations.
selectionOperation determines what to do with the currently selected items.
This function was introduced in Qt 5.5.
See also clearSelection() and selectionArea().
Upstream PySide2 reference signatures (binding differences may apply):
setSelectionArea(self, path: PySide2.QtGui.QPainterPath, deviceTransform: PySide2.QtGui.QTransform) -> None
setSelectionArea(self, path: PySide2.QtGui.QPainterPath, mode: PySide2.QtCore.Qt.ItemSelectionMode=..., deviceTransform: PySide2.QtGui.QTransform=...) -> None
setSelectionArea(self, path: PySide2.QtGui.QPainterPath, selectionOperation: PySide2.QtCore.Qt.ItemSelectionOperation, mode: PySide2.QtCore.Qt.ItemSelectionMode=..., deviceTransform: PySide2.QtGui.QTransform=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#setSelectionArea
setSortCacheEnabled
setSortCacheEnabled(enabled: bool) -> None
X.setSortCacheEnabled(enabled)
Upstream PySide2 reference signatures (binding differences may apply):
setSortCacheEnabled(self, enabled: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#setSortCacheEnabled
setStickyFocus
setStickyFocus(enabled: bool) -> None
X.setStickyFocus(enabled)
Upstream PySide2 reference signatures (binding differences may apply):
setStickyFocus(self, enabled: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#setStickyFocus
setStyle
setStyle(style: Any) -> None
X.setStyle(style)
Supplemental documentation: Qt 5 reference:
void QGraphicsScene::setStyle(QStyle *style)
Sets or replaces the style of the scene to style, and reparents the style to this scene. Any previously assigned style is deleted. The scene's style defaults to QApplication::style(), and serves as the default for all QGraphicsWidget items in the scene.
Changing the style, either directly by calling this function, or indirectly by calling QApplication::setStyle(), will automatically update the style for all widgets in the scene that do not have a style explicitly assigned to them.
If style is nullptr,
QGraphicsScene will revert to
QApplication::style().
This function was introduced in Qt 4.4.
See also style().
Upstream PySide2 reference signatures (binding differences may apply):
setStyle(self, style: PySide2.QtWidgets.QStyle) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#setStyle
sortCacheEnabled
instance-attribute
sortCacheEnabled: Any
stickyFocus
instance-attribute
stickyFocus: bool
Qt 5 reference:
stickyFocus : bool
This property holds whether clicking into the scene background will clear focus
In a QGraphicsScene with stickyFocus set to true, focus will remain unchanged when the user clicks into the scene background or on an item that does not accept focus. Otherwise, focus will be cleared.
By default, this property is false.
Focus changes in response to a mouse press. You can reimplement mousePressEvent() in a subclass of QGraphicsScene to toggle this property based on where the user has clicked.
This property was introduced in Qt 4.6.
Access functions:
| bool | stickyFocus() const |
|---|---|
| void | setStickyFocus(bool enabled) |
See also clearFocus() and setFocusItem().
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#stickyFocus
style
style() -> Any
X.style() -> PythonQt.QtGui.QStyle
Supplemental documentation: Qt 5 reference:
QStyle *QGraphicsScene::style() const
Returns the scene's style, or the same as QApplication::style() if the scene has not been explicitly assigned a style.
This function was introduced in Qt 4.4.
See also setStyle().
Upstream PySide2 reference signatures (binding differences may apply):
style(self) -> PySide2.QtWidgets.QStyle
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#style
update
update(x: Any, y: Any, w: Any, h: Any) -> None
X.update(x, y, w, h)
Supplemental documentation: Qt 5 reference:
[slot] void QGraphicsScene::update(const QRectF \&rect \= QRectF())
Schedules a redraw of the area rect on the scene.
See also sceneRect() and changed().
void QGraphicsScene::update(qreal x, qreal y, qreal w, qreal h)
This is an overloaded function.
This function is equivalent to calling update(QRectF(x, y, w, h));
This function was introduced in Qt 4.3.
Upstream PySide2 reference signatures (binding differences may apply):
update(self, rect: PySide2.QtCore.QRectF=...) -> None
update(self, x: float, y: float, w: float, h: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#update
views
views() -> tuple
X.views() -> tuple
Supplemental documentation: Qt 5 reference:
QList\<QGraphicsView *> QGraphicsScene::views() const
Returns a list of all the views that display this scene.
See also QGraphicsView::scene().
Upstream PySide2 reference signatures (binding differences may apply):
views(self) -> typing.List[PySide2.QtWidgets.QGraphicsView]
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#views
wheelEvent
wheelEvent(event: Any) -> None
X.wheelEvent(event)
Supplemental documentation: Qt 5 reference:
[virtual protected] void QGraphicsScene::wheelEvent(QGraphicsSceneWheelEvent *wheelEvent)
This event handler, for event wheelEvent, can be reimplemented in a subclass to receive mouse wheel events for the scene.
By default, the event is delivered to the topmost visible item under the cursor. If ignored, the event propagates to the item beneath, and again until the event is accepted, or it reaches the scene. If no items accept the event, it is ignored.
Note: See items() for a definition of which items are considered visible by this function.
See also QGraphicsItem::wheelEvent().
Upstream PySide2 reference signatures (binding differences may apply):
wheelEvent(self, event: PySide2.QtWidgets.QGraphicsSceneWheelEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#wheelEvent
width
width() -> float
X.width() -> float
Supplemental documentation: Qt 5 reference:
qreal QGraphicsScene::width() const
This convenience function is equivalent to calling sceneRect().width().
See also height().
Upstream PySide2 reference signatures (binding differences may apply):
width(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsscene.html#width