Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Module « PySide2.QtWidgets »

Classe « QGraphicsScene »

Informations générales

Héritage

builtins.object
    Object
        QObject
            QGraphicsScene

Définition

class QGraphicsScene(QObject):

Description [extrait de QGraphicsScene.__doc__]

QGraphicsScene(self, parent: typing.Union[PySide2.QtCore.QObject, NoneType] = None)
QGraphicsScene(self, sceneRect: PySide2.QtCore.QRectF, parent: typing.Union[PySide2.QtCore.QObject, NoneType] = None)
QGraphicsScene(self, x: float, y: float, width: float, height: float, parent: typing.Union[PySide2.QtCore.QObject, NoneType] = None)

Constructeur(s)

Signature du constructeur Description
__new__(*args, **kwargs) Create and return a new object. See help(type) for accurate signature. [extrait de __new__.__doc__]
__init__(self, /, *args, **kwargs) Initialize self. See help(type(self)) for accurate signature. [extrait de __init__.__doc__]

Liste des attributs statiques

Nom de l'attribut Valeur
AllLayersPySide2.QtWidgets.QGraphicsScene.SceneLayer.AllLayers
BackgroundLayerPySide2.QtWidgets.QGraphicsScene.SceneLayer.BackgroundLayer
BspTreeIndexPySide2.QtWidgets.QGraphicsScene.ItemIndexMethod.BspTreeIndex
ForegroundLayerPySide2.QtWidgets.QGraphicsScene.SceneLayer.ForegroundLayer
ItemLayerPySide2.QtWidgets.QGraphicsScene.SceneLayer.ItemLayer
NoIndexPySide2.QtWidgets.QGraphicsScene.ItemIndexMethod.NoIndex
staticMetaObject<PySide2.QtCore.QMetaObject object at 0x7efe35a72f80>

Liste des opérateurs

Opérateurs hérités de la classe object

__eq__, __ge__, __gt__, __le__, __lt__, __ne__

Liste des méthodes

Toutes les méthodes Méthodes d'instance Méthodes statiques Méthodes dépréciées
Signature de la méthodeDescription
__delattr__(self, name) Implement delattr(self, name). [extrait de __delattr__.__doc__]
__setattr__(self, name, value) Implement setattr(self, name, value). [extrait de __setattr__.__doc__]
activePanel(self) -> PySide2.QtWidgets.QGraphicsItem activePanel(self) -> PySide2.QtWidgets.QGraphicsItem [extrait de activePanel.__doc__]
activeWindow(self) -> PySide2.QtWidgets.QGraphicsWidget activeWindow(self) -> PySide2.QtWidgets.QGraphicsWidget [extrait de activeWindow.__doc__]
addEllipse addEllipse(self, rect: PySide2.QtCore.QRectF, pen: PySide2.QtGui.QPen = Default(QPen), brush: PySide2.QtGui.QBrush = Default(QBrush)) -> PySide2.QtWidgets.QGraphicsEllipseItem [extrait de addEllipse.__doc__]
addItem(self, item: PySide2.QtWidgets.QGraphicsItem) addItem(self, item: PySide2.QtWidgets.QGraphicsItem) [extrait de addItem.__doc__]
addLine addLine(self, line: PySide2.QtCore.QLineF, pen: PySide2.QtGui.QPen = Default(QPen)) -> PySide2.QtWidgets.QGraphicsLineItem [extrait de addLine.__doc__]
addPath(self, path: PySide2.QtGui.QPainterPath, pen: PySide2.QtGui.QPen = Default(QPen), brush: PySide2.QtGui.QBrush = Default(QBrush)) -> PySide2.QtWidgets.QGraphicsPathItem addPath(self, path: PySide2.QtGui.QPainterPath, pen: PySide2.QtGui.QPen = Default(QPen), brush: PySide2.QtGui.QBrush = Default(QBrush)) -> PySide2.QtWidgets.QGraphicsPathItem [extrait de addPath.__doc__]
addPixmap(self, pixmap: PySide2.QtGui.QPixmap) -> PySide2.QtWidgets.QGraphicsPixmapItem addPixmap(self, pixmap: PySide2.QtGui.QPixmap) -> PySide2.QtWidgets.QGraphicsPixmapItem [extrait de addPixmap.__doc__]
addPolygon(self, polygon: PySide2.QtGui.QPolygonF, pen: PySide2.QtGui.QPen = Default(QPen), brush: PySide2.QtGui.QBrush = Default(QBrush)) -> PySide2.QtWidgets.QGraphicsPolygonItem addPolygon(self, polygon: PySide2.QtGui.QPolygonF, pen: PySide2.QtGui.QPen = Default(QPen), brush: PySide2.QtGui.QBrush = Default(QBrush)) -> PySide2.QtWidgets.QGraphicsPolygonItem [extrait de addPolygon.__doc__]
addRect addRect(self, rect: PySide2.QtCore.QRectF, pen: PySide2.QtGui.QPen = Default(QPen), brush: PySide2.QtGui.QBrush = Default(QBrush)) -> PySide2.QtWidgets.QGraphicsRectItem [extrait de addRect.__doc__]
addSimpleText(self, text: str, font: PySide2.QtGui.QFont = Default(QFont)) -> PySide2.QtWidgets.QGraphicsSimpleTextItem addSimpleText(self, text: str, font: PySide2.QtGui.QFont = Default(QFont)) -> PySide2.QtWidgets.QGraphicsSimpleTextItem [extrait de addSimpleText.__doc__]
addText(self, text: str, font: PySide2.QtGui.QFont = Default(QFont)) -> PySide2.QtWidgets.QGraphicsTextItem addText(self, text: str, font: PySide2.QtGui.QFont = Default(QFont)) -> PySide2.QtWidgets.QGraphicsTextItem [extrait de addText.__doc__]
addWidget(self, widget: PySide2.QtWidgets.QWidget, wFlags: PySide2.QtCore.Qt.WindowFlags = Default(Qt.WindowFlags)) -> PySide2.QtWidgets.QGraphicsProxyWidget addWidget(self, widget: PySide2.QtWidgets.QWidget, wFlags: PySide2.QtCore.Qt.WindowFlags = Default(Qt.WindowFlags)) -> PySide2.QtWidgets.QGraphicsProxyWidget [extrait de addWidget.__doc__]
advance(self) advance(self) [extrait de advance.__doc__]
backgroundBrush(self) -> PySide2.QtGui.QBrush backgroundBrush(self) -> PySide2.QtGui.QBrush [extrait de backgroundBrush.__doc__]
bspTreeDepth(self) -> int bspTreeDepth(self) -> int [extrait de bspTreeDepth.__doc__]
changed
clear(self) clear(self) [extrait de clear.__doc__]
clearFocus(self) clearFocus(self) [extrait de clearFocus.__doc__]
clearSelection(self) clearSelection(self) [extrait de clearSelection.__doc__]
collidingItems(self, item: PySide2.QtWidgets.QGraphicsItem, mode: PySide2.QtCore.Qt.ItemSelectionMode = PySide2.QtCore.Qt.ItemSelectionMode.IntersectsItemShape) -> typing.List[PySide2.QtWidgets.QGraphicsItem] collidingItems(self, item: PySide2.QtWidgets.QGraphicsItem, mode: PySide2.QtCore.Qt.ItemSelectionMode = PySide2.QtCore.Qt.ItemSelectionMode.IntersectsItemShape) -> typing.List[PySide2.QtWidgets.QGraphicsItem] [extrait de collidingItems.__doc__]
contextMenuEvent(self, event: PySide2.QtWidgets.QGraphicsSceneContextMenuEvent) contextMenuEvent(self, event: PySide2.QtWidgets.QGraphicsSceneContextMenuEvent) [extrait de contextMenuEvent.__doc__]
createItemGroup(self, items: typing.Sequence[PySide2.QtWidgets.QGraphicsItem]) -> PySide2.QtWidgets.QGraphicsItemGroup createItemGroup(self, items: typing.Sequence[PySide2.QtWidgets.QGraphicsItem]) -> PySide2.QtWidgets.QGraphicsItemGroup [extrait de createItemGroup.__doc__]
destroyed
destroyItemGroup(self, group: PySide2.QtWidgets.QGraphicsItemGroup) destroyItemGroup(self, group: PySide2.QtWidgets.QGraphicsItemGroup) [extrait de destroyItemGroup.__doc__]
dragEnterEvent(self, event: PySide2.QtWidgets.QGraphicsSceneDragDropEvent) dragEnterEvent(self, event: PySide2.QtWidgets.QGraphicsSceneDragDropEvent) [extrait de dragEnterEvent.__doc__]
dragLeaveEvent(self, event: PySide2.QtWidgets.QGraphicsSceneDragDropEvent) dragLeaveEvent(self, event: PySide2.QtWidgets.QGraphicsSceneDragDropEvent) [extrait de dragLeaveEvent.__doc__]
dragMoveEvent(self, event: PySide2.QtWidgets.QGraphicsSceneDragDropEvent) dragMoveEvent(self, event: PySide2.QtWidgets.QGraphicsSceneDragDropEvent) [extrait de dragMoveEvent.__doc__]
drawBackground(self, painter: PySide2.QtGui.QPainter, rect: PySide2.QtCore.QRectF) drawBackground(self, painter: PySide2.QtGui.QPainter, rect: PySide2.QtCore.QRectF) [extrait de drawBackground.__doc__]
drawForeground(self, painter: PySide2.QtGui.QPainter, rect: PySide2.QtCore.QRectF) drawForeground(self, painter: PySide2.QtGui.QPainter, rect: PySide2.QtCore.QRectF) [extrait de drawForeground.__doc__]
dropEvent(self, event: PySide2.QtWidgets.QGraphicsSceneDragDropEvent) dropEvent(self, event: PySide2.QtWidgets.QGraphicsSceneDragDropEvent) [extrait de dropEvent.__doc__]
event(self, event: PySide2.QtCore.QEvent) -> bool event(self, event: PySide2.QtCore.QEvent) -> bool [extrait de event.__doc__]
eventFilter(self, watched: PySide2.QtCore.QObject, event: PySide2.QtCore.QEvent) -> bool eventFilter(self, watched: PySide2.QtCore.QObject, event: PySide2.QtCore.QEvent) -> bool [extrait de eventFilter.__doc__]
focusInEvent(self, event: PySide2.QtGui.QFocusEvent) focusInEvent(self, event: PySide2.QtGui.QFocusEvent) [extrait de focusInEvent.__doc__]
focusItem(self) -> PySide2.QtWidgets.QGraphicsItem focusItem(self) -> PySide2.QtWidgets.QGraphicsItem [extrait de focusItem.__doc__]
focusItemChanged
focusNextPrevChild(self, next: bool) -> bool focusNextPrevChild(self, next: bool) -> bool [extrait de focusNextPrevChild.__doc__]
focusOnTouch(self) -> bool focusOnTouch(self) -> bool [extrait de focusOnTouch.__doc__]
focusOutEvent(self, event: PySide2.QtGui.QFocusEvent) focusOutEvent(self, event: PySide2.QtGui.QFocusEvent) [extrait de focusOutEvent.__doc__]
font(self) -> PySide2.QtGui.QFont font(self) -> PySide2.QtGui.QFont [extrait de font.__doc__]
foregroundBrush(self) -> PySide2.QtGui.QBrush foregroundBrush(self) -> PySide2.QtGui.QBrush [extrait de foregroundBrush.__doc__]
hasFocus(self) -> bool hasFocus(self) -> bool [extrait de hasFocus.__doc__]
height(self) -> float height(self) -> float [extrait de height.__doc__]
helpEvent(self, event: PySide2.QtWidgets.QGraphicsSceneHelpEvent) helpEvent(self, event: PySide2.QtWidgets.QGraphicsSceneHelpEvent) [extrait de helpEvent.__doc__]
inputMethodEvent(self, event: PySide2.QtGui.QInputMethodEvent) inputMethodEvent(self, event: PySide2.QtGui.QInputMethodEvent) [extrait de inputMethodEvent.__doc__]
inputMethodQuery(self, query: PySide2.QtCore.Qt.InputMethodQuery) -> typing.Any inputMethodQuery(self, query: PySide2.QtCore.Qt.InputMethodQuery) -> typing.Any [extrait de inputMethodQuery.__doc__]
invalidate invalidate(self, rect: PySide2.QtCore.QRectF = Default(QRectF), layers: PySide2.QtWidgets.QGraphicsScene.SceneLayers = PySide2.QtWidgets.QGraphicsScene.SceneLayer.AllLayers) [extrait de invalidate.__doc__]
isActive(self) -> bool isActive(self) -> bool [extrait de isActive.__doc__]
isSortCacheEnabled(self) -> bool isSortCacheEnabled(self) -> bool [extrait de isSortCacheEnabled.__doc__]
itemAt itemAt(self, pos: PySide2.QtCore.QPointF, deviceTransform: PySide2.QtGui.QTransform) -> PySide2.QtWidgets.QGraphicsItem [extrait de itemAt.__doc__]
ItemIndexMethod
itemIndexMethod(self) -> PySide2.QtWidgets.QGraphicsScene.ItemIndexMethod itemIndexMethod(self) -> PySide2.QtWidgets.QGraphicsScene.ItemIndexMethod [extrait de itemIndexMethod.__doc__]
items items(self, order: PySide2.QtCore.Qt.SortOrder = PySide2.QtCore.Qt.SortOrder.DescendingOrder) -> typing.List[PySide2.QtWidgets.QGraphicsItem] [extrait de items.__doc__]
itemsBoundingRect(self) -> PySide2.QtCore.QRectF itemsBoundingRect(self) -> PySide2.QtCore.QRectF [extrait de itemsBoundingRect.__doc__]
keyPressEvent(self, event: PySide2.QtGui.QKeyEvent) keyPressEvent(self, event: PySide2.QtGui.QKeyEvent) [extrait de keyPressEvent.__doc__]
keyReleaseEvent(self, event: PySide2.QtGui.QKeyEvent) keyReleaseEvent(self, event: PySide2.QtGui.QKeyEvent) [extrait de keyReleaseEvent.__doc__]
minimumRenderSize(self) -> float minimumRenderSize(self) -> float [extrait de minimumRenderSize.__doc__]
mouseDoubleClickEvent(self, event: PySide2.QtWidgets.QGraphicsSceneMouseEvent) mouseDoubleClickEvent(self, event: PySide2.QtWidgets.QGraphicsSceneMouseEvent) [extrait de mouseDoubleClickEvent.__doc__]
mouseGrabberItem(self) -> PySide2.QtWidgets.QGraphicsItem mouseGrabberItem(self) -> PySide2.QtWidgets.QGraphicsItem [extrait de mouseGrabberItem.__doc__]
mouseMoveEvent(self, event: PySide2.QtWidgets.QGraphicsSceneMouseEvent) mouseMoveEvent(self, event: PySide2.QtWidgets.QGraphicsSceneMouseEvent) [extrait de mouseMoveEvent.__doc__]
mousePressEvent(self, event: PySide2.QtWidgets.QGraphicsSceneMouseEvent) mousePressEvent(self, event: PySide2.QtWidgets.QGraphicsSceneMouseEvent) [extrait de mousePressEvent.__doc__]
mouseReleaseEvent(self, event: PySide2.QtWidgets.QGraphicsSceneMouseEvent) mouseReleaseEvent(self, event: PySide2.QtWidgets.QGraphicsSceneMouseEvent) [extrait de mouseReleaseEvent.__doc__]
objectNameChanged
palette(self) -> PySide2.QtGui.QPalette palette(self) -> PySide2.QtGui.QPalette [extrait de palette.__doc__]
removeItem(self, item: PySide2.QtWidgets.QGraphicsItem) removeItem(self, item: PySide2.QtWidgets.QGraphicsItem) [extrait de removeItem.__doc__]
render(self, painter: PySide2.QtGui.QPainter, target: PySide2.QtCore.QRectF = Default(QRectF), source: PySide2.QtCore.QRectF = Default(QRectF), aspectRatioMode: PySide2.QtCore.Qt.AspectRatioMode = PySide2.QtCore.Qt.AspectRatioMode.KeepAspectRatio) render(self, painter: PySide2.QtGui.QPainter, target: PySide2.QtCore.QRectF = Default(QRectF), source: PySide2.QtCore.QRectF = Default(QRectF), aspectRatioMode: PySide2.QtCore.Qt.AspectRatioMode = PySide2.QtCore.Qt.AspectRatioMode.KeepAspectRatio) [extrait de render.__doc__]
SceneLayer
SceneLayers
sceneRect(self) -> PySide2.QtCore.QRectF sceneRect(self) -> PySide2.QtCore.QRectF [extrait de sceneRect.__doc__]
sceneRectChanged
selectedItems(self) -> typing.List[PySide2.QtWidgets.QGraphicsItem] selectedItems(self) -> typing.List[PySide2.QtWidgets.QGraphicsItem] [extrait de selectedItems.__doc__]
selectionArea(self) -> PySide2.QtGui.QPainterPath selectionArea(self) -> PySide2.QtGui.QPainterPath [extrait de selectionArea.__doc__]
selectionChanged
sendEvent(self, item: PySide2.QtWidgets.QGraphicsItem, event: PySide2.QtCore.QEvent) -> bool sendEvent(self, item: PySide2.QtWidgets.QGraphicsItem, event: PySide2.QtCore.QEvent) -> bool [extrait de sendEvent.__doc__]
setActivePanel(self, item: PySide2.QtWidgets.QGraphicsItem) setActivePanel(self, item: PySide2.QtWidgets.QGraphicsItem) [extrait de setActivePanel.__doc__]
setActiveWindow(self, widget: PySide2.QtWidgets.QGraphicsWidget) setActiveWindow(self, widget: PySide2.QtWidgets.QGraphicsWidget) [extrait de setActiveWindow.__doc__]
setBackgroundBrush(self, brush: PySide2.QtGui.QBrush) setBackgroundBrush(self, brush: PySide2.QtGui.QBrush) [extrait de setBackgroundBrush.__doc__]
setBspTreeDepth(self, depth: int) setBspTreeDepth(self, depth: int) [extrait de setBspTreeDepth.__doc__]
setFocus(self, focusReason: PySide2.QtCore.Qt.FocusReason = PySide2.QtCore.Qt.FocusReason.OtherFocusReason) setFocus(self, focusReason: PySide2.QtCore.Qt.FocusReason = PySide2.QtCore.Qt.FocusReason.OtherFocusReason) [extrait de setFocus.__doc__]
setFocusItem(self, item: PySide2.QtWidgets.QGraphicsItem, focusReason: PySide2.QtCore.Qt.FocusReason = PySide2.QtCore.Qt.FocusReason.OtherFocusReason) setFocusItem(self, item: PySide2.QtWidgets.QGraphicsItem, focusReason: PySide2.QtCore.Qt.FocusReason = PySide2.QtCore.Qt.FocusReason.OtherFocusReason) [extrait de setFocusItem.__doc__]
setFocusOnTouch(self, enabled: bool) setFocusOnTouch(self, enabled: bool) [extrait de setFocusOnTouch.__doc__]
setFont(self, font: PySide2.QtGui.QFont) setFont(self, font: PySide2.QtGui.QFont) [extrait de setFont.__doc__]
setForegroundBrush(self, brush: PySide2.QtGui.QBrush) setForegroundBrush(self, brush: PySide2.QtGui.QBrush) [extrait de setForegroundBrush.__doc__]
setItemIndexMethod(self, method: PySide2.QtWidgets.QGraphicsScene.ItemIndexMethod) setItemIndexMethod(self, method: PySide2.QtWidgets.QGraphicsScene.ItemIndexMethod) [extrait de setItemIndexMethod.__doc__]
setMinimumRenderSize(self, minSize: float) setMinimumRenderSize(self, minSize: float) [extrait de setMinimumRenderSize.__doc__]
setPalette(self, palette: PySide2.QtGui.QPalette) setPalette(self, palette: PySide2.QtGui.QPalette) [extrait de setPalette.__doc__]
setSceneRect setSceneRect(self, rect: PySide2.QtCore.QRectF) [extrait de setSceneRect.__doc__]
setSelectionArea setSelectionArea(self, path: PySide2.QtGui.QPainterPath, deviceTransform: PySide2.QtGui.QTransform) [extrait de setSelectionArea.__doc__]
setSortCacheEnabled(self, enabled: bool) setSortCacheEnabled(self, enabled: bool) [extrait de setSortCacheEnabled.__doc__]
setStickyFocus(self, enabled: bool) setStickyFocus(self, enabled: bool) [extrait de setStickyFocus.__doc__]
setStyle(self, style: PySide2.QtWidgets.QStyle) setStyle(self, style: PySide2.QtWidgets.QStyle) [extrait de setStyle.__doc__]
stickyFocus(self) -> bool stickyFocus(self) -> bool [extrait de stickyFocus.__doc__]
style(self) -> PySide2.QtWidgets.QStyle style(self) -> PySide2.QtWidgets.QStyle [extrait de style.__doc__]
update update(self, rect: PySide2.QtCore.QRectF = Default(QRectF)) [extrait de update.__doc__]
views(self) -> typing.List[PySide2.QtWidgets.QGraphicsView] views(self) -> typing.List[PySide2.QtWidgets.QGraphicsView] [extrait de views.__doc__]
wheelEvent(self, event: PySide2.QtWidgets.QGraphicsSceneWheelEvent) wheelEvent(self, event: PySide2.QtWidgets.QGraphicsSceneWheelEvent) [extrait de wheelEvent.__doc__]
width(self) -> float width(self) -> float [extrait de width.__doc__]

Méthodes héritées de la classe QObject

__getattribute__, __init_subclass__, __repr__, __subclasshook__, blockSignals, childEvent, children, connect, connectNotify, customEvent, deleteLater, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, emit, findChild, findChildren, inherits, installEventFilter, isSignalConnected, isWidgetType, isWindowType, killTimer, metaObject, moveToThread, objectName, parent, property, receivers, registerUserData, removeEventFilter, sender, senderSignalIndex, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr

Méthodes héritées de la classe Object

__init_subclass__, __subclasshook__

Méthodes héritées de la classe object

__dir__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __sizeof__, __str__