Vous êtes un professionnel et vous avez besoin d'une formation ?
Programmation Python Les compléments
Voir le programme détaillé
Module « PySide6.QtWidgets »
Classe « QMenu »
Informations générales
Héritage
builtins.object
Object
QPaintDevice
builtins.object
Object
QObject
QWidget
QMenu
Définition
class QMenu (QWidget ):
help(QMenu )
QMenu(self, title: str, /, parent: Optional[PySide6.QtWidgets.QWidget] = None, *, tearOffEnabled: Optional[bool] = None, icon: Optional[PySide6.QtGui.QIcon] = None, separatorsCollapsible: Optional[bool] = None, toolTipsVisible: Optional[bool] = None) -> None
QMenu(self, /, parent: Optional[PySide6.QtWidgets.QWidget] = None, *, tearOffEnabled: Optional[bool] = None, title: Optional[str] = None, icon: Optional[PySide6.QtGui.QIcon] = None, separatorsCollapsible: Optional[bool] = None, toolTipsVisible: Optional[bool] = None) -> None
Constructeur(s)
Liste des attributs statiques
staticMetaObject PySide6.QtCore.QMetaObject("QMenu" inherits "QWidget":
Properties:
#60 "tearOffEnabled", bool [writeable] [designable]
#61 "title", QString [writeable] [designable]
#62 "icon", QIcon [writeable] [designable]
#63 "separatorsCollapsible", bool [writeable] [designable]
#64 "toolTipsVisible", bool [writeable] [designable]
Methods:
#33 type=Signal, signature=aboutToShow()
#34 type=Signal, signature=aboutToHide()
#35 type=Signal, signature=triggered(QAction*), parameters=QAction*
#36 type=Signal, signature=hovered(QAction*), parameters=QAction*
#37 type=Slot, signature=internalDelayedPopup()
#38 type=Slot, signature=_q_actionTriggered()
#39 type=Slot, signature=_q_actionHovered()
#40 type=Slot, signature=_q_overrideMenuActionDestroyed()
#41 type=Slot, signature=_q_platformMenuAboutToShow()
)
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
__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, object)
actionEvent(self, object)
actionGeometry(self, object)
activeAction(self)
addAction
addMenu
addSection
addSeparator(self)
changeEvent(self, object)
clear(self)
columnCount(self)
customContextMenuRequested
defaultAction(self)
destroyed
enterEvent(self, object)
event(self, object)
exec
exec_
focusNextPrevChild(self, object)
hideEvent(self, object)
hideTearOffMenu(self)
hovered
icon(self)
initStyleOption
insertMenu
insertSection
insertSeparator(self, object)
isEmpty(self)
isTearOffEnabled(self)
isTearOffMenuVisible(self)
keyPressEvent(self, object)
leaveEvent(self, object)
menuAction(self)
menuInAction(object)
mouseMoveEvent(self, object)
mousePressEvent(self, object)
mouseReleaseEvent(self, object)
objectNameChanged
paintEvent(self, object)
popup
separatorsCollapsible(self)
setActiveAction(self, object)
setDefaultAction(self, object)
setIcon(self, object)
setSeparatorsCollapsible(self, object)
setTearOffEnabled(self, object)
setTitle(self, object)
setToolTipsVisible(self, object)
showTearOffMenu
sizeHint(self)
timerEvent(self, object)
title(self)
toolTipsVisible(self)
tr
triggered
wheelEvent(self, object)
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 ,
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 ,
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 ,
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 ,
setScreen ,
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 ,
encodeMetricF ,
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 ,
isQuickItemType ,
isSignalConnected ,
isWidgetType ,
isWindowType ,
killTimer ,
metaObject ,
moveToThread ,
objectName ,
parent ,
property ,
receivers ,
removeEventFilter ,
sender ,
senderSignalIndex ,
setObjectName ,
setParent ,
setProperty ,
signalsBlocked ,
startTimer ,
thread
Méthodes héritées de la classe Object
__init_subclass__, __subclasshook__
Méthodes héritées de la classe object
__dir__ ,
__format__ ,
__getstate__ ,
__hash__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__sizeof__ ,
__str__
Vous êtes un professionnel et vous avez besoin d'une formation ?
Calcul scientifique avec Python
Voir le programme détaillé
2026 © SARL Infini Software - Tous droits réservés
Mentions légales
Les informations présentes dans ce site vous sont fournies dans le but de vous aider à acquérir les compétences nécessaires à
l'utilisation des langages ou des technologies considérés. Infini Software ne pourra nullement être tenu responsable de l'utilisation
des informations présentes dans ce site.
De plus, si vous remarquez des erreurs ou des oublis dans ce document, n'hésitez surtout pas à nous le signaler en envoyant un mail
à l'adresse : .
Les autres marques et les noms de produits cités dans ces documents sont la propriété de leurs éditeurs respectifs.
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 :