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 « QMenu »

Informations générales

Héritage

builtins.object
    Object
        QPaintDevice
builtins.object
    Object
        QObject
            QWidget
                QMenu

Définition

class QMenu(QWidget):

Description [extrait de QMenu.__doc__]

QMenu(self, parent: typing.Union[PySide2.QtWidgets.QWidget, NoneType] = None)
QMenu(self, title: str, parent: typing.Union[PySide2.QtWidgets.QWidget, 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
DrawChildrenPySide2.QtWidgets.QWidget.RenderFlag.DrawChildren
DrawWindowBackgroundPySide2.QtWidgets.QWidget.RenderFlag.DrawWindowBackground
IgnoreMaskPySide2.QtWidgets.QWidget.RenderFlag.IgnoreMask
PdmDepthPySide2.QtGui.QPaintDevice.PaintDeviceMetric.PdmDepth
PdmDevicePixelRatioPySide2.QtGui.QPaintDevice.PaintDeviceMetric.PdmDevicePixelRatio
PdmDevicePixelRatioScaledPySide2.QtGui.QPaintDevice.PaintDeviceMetric.PdmDevicePixelRatioScaled
PdmDpiXPySide2.QtGui.QPaintDevice.PaintDeviceMetric.PdmDpiX
PdmDpiYPySide2.QtGui.QPaintDevice.PaintDeviceMetric.PdmDpiY
PdmHeightPySide2.QtGui.QPaintDevice.PaintDeviceMetric.PdmHeight
PdmHeightMMPySide2.QtGui.QPaintDevice.PaintDeviceMetric.PdmHeightMM
PdmNumColorsPySide2.QtGui.QPaintDevice.PaintDeviceMetric.PdmNumColors
PdmPhysicalDpiXPySide2.QtGui.QPaintDevice.PaintDeviceMetric.PdmPhysicalDpiX
PdmPhysicalDpiYPySide2.QtGui.QPaintDevice.PaintDeviceMetric.PdmPhysicalDpiY
PdmWidthPySide2.QtGui.QPaintDevice.PaintDeviceMetric.PdmWidth
PdmWidthMMPySide2.QtGui.QPaintDevice.PaintDeviceMetric.PdmWidthMM
staticMetaObject<PySide2.QtCore.QMetaObject object at 0x7efe35a02800>

Attributs statiques hérités de la classe QPaintDevice

painters

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__]
__getattribute__(self, name) Return getattr(self, name). [extrait de __getattribute__.__doc__]
__setattr__(self, name, value) Implement setattr(self, name, value). [extrait de __setattr__.__doc__]
aboutToHide
aboutToShow
actionAt(self, arg__1: PySide2.QtCore.QPoint) -> PySide2.QtWidgets.QAction actionAt(self, arg__1: PySide2.QtCore.QPoint) -> PySide2.QtWidgets.QAction [extrait de actionAt.__doc__]
actionEvent(self, arg__1: PySide2.QtGui.QActionEvent) actionEvent(self, arg__1: PySide2.QtGui.QActionEvent) [extrait de actionEvent.__doc__]
actionGeometry(self, arg__1: PySide2.QtWidgets.QAction) -> PySide2.QtCore.QRect actionGeometry(self, arg__1: PySide2.QtWidgets.QAction) -> PySide2.QtCore.QRect [extrait de actionGeometry.__doc__]
activeAction(self) -> PySide2.QtWidgets.QAction activeAction(self) -> PySide2.QtWidgets.QAction [extrait de activeAction.__doc__]
addAction addAction(self, arg__1: PySide2.QtGui.QIcon, arg__2: str, arg__3: object, arg__4: typing.Union[PySide2.QtGui.QKeySequence, NoneType] = None) [extrait de addAction.__doc__]
addMenu addMenu(self, icon: PySide2.QtGui.QIcon, title: str) -> PySide2.QtWidgets.QMenu [extrait de addMenu.__doc__]
addSection addSection(self, icon: PySide2.QtGui.QIcon, text: str) -> PySide2.QtWidgets.QAction [extrait de addSection.__doc__]
addSeparator(self) -> PySide2.QtWidgets.QAction addSeparator(self) -> PySide2.QtWidgets.QAction [extrait de addSeparator.__doc__]
changeEvent(self, arg__1: PySide2.QtCore.QEvent) changeEvent(self, arg__1: PySide2.QtCore.QEvent) [extrait de changeEvent.__doc__]
clear(self) clear(self) [extrait de clear.__doc__]
columnCount(self) -> int columnCount(self) -> int [extrait de columnCount.__doc__]
customContextMenuRequested
defaultAction(self) -> PySide2.QtWidgets.QAction defaultAction(self) -> PySide2.QtWidgets.QAction [extrait de defaultAction.__doc__]
destroyed
enterEvent(self, arg__1: PySide2.QtCore.QEvent) enterEvent(self, arg__1: PySide2.QtCore.QEvent) [extrait de enterEvent.__doc__]
event(self, arg__1: PySide2.QtCore.QEvent) -> bool event(self, arg__1: PySide2.QtCore.QEvent) -> bool [extrait de event.__doc__]
exec_ exec_() -> PySide2.QtWidgets.QAction [extrait de exec_.__doc__]
focusNextPrevChild(self, next: bool) -> bool focusNextPrevChild(self, next: bool) -> bool [extrait de focusNextPrevChild.__doc__]
hideEvent(self, arg__1: PySide2.QtGui.QHideEvent) hideEvent(self, arg__1: PySide2.QtGui.QHideEvent) [extrait de hideEvent.__doc__]
hideTearOffMenu(self) hideTearOffMenu(self) [extrait de hideTearOffMenu.__doc__]
hovered
icon(self) -> PySide2.QtGui.QIcon icon(self) -> PySide2.QtGui.QIcon [extrait de icon.__doc__]
initStyleOption(self, option: PySide2.QtWidgets.QStyleOptionMenuItem, action: PySide2.QtWidgets.QAction) initStyleOption(self, option: PySide2.QtWidgets.QStyleOptionMenuItem, action: PySide2.QtWidgets.QAction) [extrait de initStyleOption.__doc__]
insertMenu(self, before: PySide2.QtWidgets.QAction, menu: PySide2.QtWidgets.QMenu) -> PySide2.QtWidgets.QAction insertMenu(self, before: PySide2.QtWidgets.QAction, menu: PySide2.QtWidgets.QMenu) -> PySide2.QtWidgets.QAction [extrait de insertMenu.__doc__]
insertSection insertSection(self, before: PySide2.QtWidgets.QAction, icon: PySide2.QtGui.QIcon, text: str) -> PySide2.QtWidgets.QAction [extrait de insertSection.__doc__]
insertSeparator(self, before: PySide2.QtWidgets.QAction) -> PySide2.QtWidgets.QAction insertSeparator(self, before: PySide2.QtWidgets.QAction) -> PySide2.QtWidgets.QAction [extrait de insertSeparator.__doc__]
isEmpty(self) -> bool isEmpty(self) -> bool [extrait de isEmpty.__doc__]
isTearOffEnabled(self) -> bool isTearOffEnabled(self) -> bool [extrait de isTearOffEnabled.__doc__]
isTearOffMenuVisible(self) -> bool isTearOffMenuVisible(self) -> bool [extrait de isTearOffMenuVisible.__doc__]
keyPressEvent(self, arg__1: PySide2.QtGui.QKeyEvent) keyPressEvent(self, arg__1: PySide2.QtGui.QKeyEvent) [extrait de keyPressEvent.__doc__]
leaveEvent(self, arg__1: PySide2.QtCore.QEvent) leaveEvent(self, arg__1: PySide2.QtCore.QEvent) [extrait de leaveEvent.__doc__]
menuAction(self) -> PySide2.QtWidgets.QAction menuAction(self) -> PySide2.QtWidgets.QAction [extrait de menuAction.__doc__]
mouseMoveEvent(self, arg__1: PySide2.QtGui.QMouseEvent) mouseMoveEvent(self, arg__1: PySide2.QtGui.QMouseEvent) [extrait de mouseMoveEvent.__doc__]
mousePressEvent(self, arg__1: PySide2.QtGui.QMouseEvent) mousePressEvent(self, arg__1: PySide2.QtGui.QMouseEvent) [extrait de mousePressEvent.__doc__]
mouseReleaseEvent(self, arg__1: PySide2.QtGui.QMouseEvent) mouseReleaseEvent(self, arg__1: PySide2.QtGui.QMouseEvent) [extrait de mouseReleaseEvent.__doc__]
objectNameChanged
paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent) paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent) [extrait de paintEvent.__doc__]
popup(self, pos: PySide2.QtCore.QPoint, at: typing.Union[PySide2.QtWidgets.QAction, NoneType] = None) popup(self, pos: PySide2.QtCore.QPoint, at: typing.Union[PySide2.QtWidgets.QAction, NoneType] = None) [extrait de popup.__doc__]
separatorsCollapsible(self) -> bool separatorsCollapsible(self) -> bool [extrait de separatorsCollapsible.__doc__]
setActiveAction(self, act: PySide2.QtWidgets.QAction) setActiveAction(self, act: PySide2.QtWidgets.QAction) [extrait de setActiveAction.__doc__]
setDefaultAction(self, arg__1: PySide2.QtWidgets.QAction) setDefaultAction(self, arg__1: PySide2.QtWidgets.QAction) [extrait de setDefaultAction.__doc__]
setIcon(self, icon: PySide2.QtGui.QIcon) setIcon(self, icon: PySide2.QtGui.QIcon) [extrait de setIcon.__doc__]
setSeparatorsCollapsible(self, collapse: bool) setSeparatorsCollapsible(self, collapse: bool) [extrait de setSeparatorsCollapsible.__doc__]
setTearOffEnabled(self, arg__1: bool) setTearOffEnabled(self, arg__1: bool) [extrait de setTearOffEnabled.__doc__]
setTitle(self, title: str) setTitle(self, title: str) [extrait de setTitle.__doc__]
setToolTipsVisible(self, visible: bool) setToolTipsVisible(self, visible: bool) [extrait de setToolTipsVisible.__doc__]
showTearOffMenu showTearOffMenu(self) [extrait de showTearOffMenu.__doc__]
sizeHint(self) -> PySide2.QtCore.QSize sizeHint(self) -> PySide2.QtCore.QSize [extrait de sizeHint.__doc__]
timerEvent(self, arg__1: PySide2.QtCore.QTimerEvent) timerEvent(self, arg__1: PySide2.QtCore.QTimerEvent) [extrait de timerEvent.__doc__]
title(self) -> str title(self) -> str [extrait de title.__doc__]
toolTipsVisible(self) -> bool toolTipsVisible(self) -> bool [extrait de toolTipsVisible.__doc__]
triggered
wheelEvent(self, arg__1: PySide2.QtGui.QWheelEvent) wheelEvent(self, arg__1: PySide2.QtGui.QWheelEvent) [extrait de wheelEvent.__doc__]
windowIconChanged
windowIconTextChanged
windowTitleChanged

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

__init_subclass__, __repr__, __subclasshook__, acceptDrops, accessibleDescription, accessibleName, actions, activateWindow, addActions, adjustSize, autoFillBackground, backgroundRole, backingStore, baseSize, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, contentsMargins, contentsRect, contextMenuEvent, contextMenuPolicy, create, createWindowContainer, createWinId, cursor, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, ensurePolished, find, focusInEvent, focusNextChild, focusOutEvent, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grab, grabGesture, grabKeyboard, grabMouse, grabShortcut, graphicsEffect, graphicsProxyWidget, hasFocus, hasHeightForWidth, hasMouseTracking, hasTabletTracking, height, heightForWidth, hide, initPainter, inputMethodEvent, inputMethodHints, inputMethodQuery, insertAction, insertActions, internalWinId, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isEnabledToTLW, isFullScreen, isHidden, isLeftToRight, isMaximized, isMinimized, isModal, isRightToLeft, isTopLevel, isVisible, isVisibleTo, isWindow, isWindowModified, keyboardGrabber, keyReleaseEvent, layout, layoutDirection, locale, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumSizeHint, minimumWidth, mouseDoubleClickEvent, mouseGrabber, move, moveEvent, nativeEvent, nativeParentWidget, nextInFocusChain, normalGeometry, overrideWindowFlags, overrideWindowState, paintEngine, palette, parentWidget, pos, previousInFocusChain, raise_, rect, redirected, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, RenderFlag, RenderFlags, repaint, resize, resizeEvent, restoreGeometry, saveGeometry, screen, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedWidth, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGraphicsEffect, setHidden, setInputMethodHints, setLayout, setLayoutDirection, setLocale, setMask, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setShortcutAutoRepeat, setShortcutEnabled, setSizeIncrement, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabletTracking, setTabOrder, setToolTip, setToolTipDuration, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFilePath, setWindowFlag, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowTitle, sharedPainter, show, showEvent, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, toolTipDuration, topLevelWidget, underMouse, ungrabGesture, unsetCursor, unsetLayoutDirection, unsetLocale, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, width, window, windowFilePath, windowFlags, windowHandle, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, winId, x, y

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

__init_subclass__, __subclasshook__, colorCount, depth, devicePixelRatio, devicePixelRatioF, devicePixelRatioFScale, devType, height, heightMM, initPainter, logicalDpiX, logicalDpiY, metric, PaintDeviceMetric, paintEngine, paintingActive, physicalDpiX, physicalDpiY, redirected, sharedPainter, width, widthMM

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

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

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

__init_subclass__, __subclasshook__

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

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