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

Informations générales

Héritage

builtins.object
    Object
        QPaintDevice
builtins.object
    Object
        QObject
            QWidget
                QDialog
                    QMessageBox

Définition

class QMessageBox(QDialog):

Description [extrait de QMessageBox.__doc__]

QMessageBox(self, icon: PySide2.QtWidgets.QMessageBox.Icon, title: str, text: str, buttons: PySide2.QtWidgets.QMessageBox.StandardButtons = PySide2.QtWidgets.QMessageBox.StandardButton.NoButton, parent: typing.Union[PySide2.QtWidgets.QWidget, NoneType] = None, flags: PySide2.QtCore.Qt.WindowFlags = Instance(Qt.Dialog | Qt.MSWindowsFixedSizeDialogHint))
QMessageBox(self, 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
AbortPySide2.QtWidgets.QMessageBox.StandardButton.Abort
AcceptedPySide2.QtWidgets.QDialog.DialogCode.Accepted
AcceptRolePySide2.QtWidgets.QMessageBox.ButtonRole.AcceptRole
ActionRolePySide2.QtWidgets.QMessageBox.ButtonRole.ActionRole
ApplyPySide2.QtWidgets.QMessageBox.StandardButton.Apply
ApplyRolePySide2.QtWidgets.QMessageBox.ButtonRole.ApplyRole
ButtonMaskPySide2.QtWidgets.QMessageBox.StandardButton.ButtonMask
CancelPySide2.QtWidgets.QMessageBox.StandardButton.Cancel
ClosePySide2.QtWidgets.QMessageBox.StandardButton.Close
CriticalPySide2.QtWidgets.QMessageBox.Icon.Critical
DefaultPySide2.QtWidgets.QMessageBox.StandardButton.Default
DestructiveRolePySide2.QtWidgets.QMessageBox.ButtonRole.DestructiveRole
DiscardPySide2.QtWidgets.QMessageBox.StandardButton.Discard
DrawChildrenPySide2.QtWidgets.QWidget.RenderFlag.DrawChildren
DrawWindowBackgroundPySide2.QtWidgets.QWidget.RenderFlag.DrawWindowBackground
EscapePySide2.QtWidgets.QMessageBox.StandardButton.Escape
FirstButtonPySide2.QtWidgets.QMessageBox.StandardButton.FirstButton
FlagMaskPySide2.QtWidgets.QMessageBox.StandardButton.FlagMask
HelpPySide2.QtWidgets.QMessageBox.StandardButton.Help
HelpRolePySide2.QtWidgets.QMessageBox.ButtonRole.HelpRole
IgnorePySide2.QtWidgets.QMessageBox.StandardButton.Ignore
IgnoreMaskPySide2.QtWidgets.QWidget.RenderFlag.IgnoreMask
InformationPySide2.QtWidgets.QMessageBox.Icon.Information
InvalidRolePySide2.QtWidgets.QMessageBox.ButtonRole.InvalidRole
LastButtonPySide2.QtWidgets.QMessageBox.StandardButton.LastButton
NoPySide2.QtWidgets.QMessageBox.StandardButton.No
NoAllPySide2.QtWidgets.QMessageBox.StandardButton.NoAll
NoButtonPySide2.QtWidgets.QMessageBox.StandardButton.NoButton
NoIconPySide2.QtWidgets.QMessageBox.Icon.NoIcon
NoRolePySide2.QtWidgets.QMessageBox.ButtonRole.NoRole
NoToAllPySide2.QtWidgets.QMessageBox.StandardButton.NoToAll
NRolesPySide2.QtWidgets.QMessageBox.ButtonRole.NRoles
OkPySide2.QtWidgets.QMessageBox.StandardButton.Ok
OpenPySide2.QtWidgets.QMessageBox.StandardButton.Open
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
QuestionPySide2.QtWidgets.QMessageBox.Icon.Question
RejectedPySide2.QtWidgets.QDialog.DialogCode.Rejected
RejectRolePySide2.QtWidgets.QMessageBox.ButtonRole.RejectRole
ResetPySide2.QtWidgets.QMessageBox.StandardButton.Reset
ResetRolePySide2.QtWidgets.QMessageBox.ButtonRole.ResetRole
RestoreDefaultsPySide2.QtWidgets.QMessageBox.StandardButton.RestoreDefaults
RetryPySide2.QtWidgets.QMessageBox.StandardButton.Retry
SavePySide2.QtWidgets.QMessageBox.StandardButton.Save
SaveAllPySide2.QtWidgets.QMessageBox.StandardButton.SaveAll
staticMetaObject<PySide2.QtCore.QMetaObject object at 0x7efe35a22f00>
WarningPySide2.QtWidgets.QMessageBox.Icon.Warning
YesPySide2.QtWidgets.QMessageBox.StandardButton.Yes
YesAllPySide2.QtWidgets.QMessageBox.StandardButton.YesAll
YesRolePySide2.QtWidgets.QMessageBox.ButtonRole.YesRole
YesToAllPySide2.QtWidgets.QMessageBox.StandardButton.YesToAll

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__]
__setattr__(self, name, value) Implement setattr(self, name, value). [extrait de __setattr__.__doc__]
about(parent: PySide2.QtWidgets.QWidget, title: str, text: str) about(parent: PySide2.QtWidgets.QWidget, title: str, text: str) [extrait de about.__doc__]
aboutQt(parent: PySide2.QtWidgets.QWidget, title: str = '') aboutQt(parent: PySide2.QtWidgets.QWidget, title: str = '') [extrait de aboutQt.__doc__]
accepted
addButton addButton(self, button: PySide2.QtWidgets.QAbstractButton, role: PySide2.QtWidgets.QMessageBox.ButtonRole) [extrait de addButton.__doc__]
button(self, which: PySide2.QtWidgets.QMessageBox.StandardButton) -> PySide2.QtWidgets.QAbstractButton button(self, which: PySide2.QtWidgets.QMessageBox.StandardButton) -> PySide2.QtWidgets.QAbstractButton [extrait de button.__doc__]
buttonClicked
ButtonRole
buttonRole(self, button: PySide2.QtWidgets.QAbstractButton) -> PySide2.QtWidgets.QMessageBox.ButtonRole buttonRole(self, button: PySide2.QtWidgets.QAbstractButton) -> PySide2.QtWidgets.QMessageBox.ButtonRole [extrait de buttonRole.__doc__]
buttons(self) -> typing.List[PySide2.QtWidgets.QAbstractButton] buttons(self) -> typing.List[PySide2.QtWidgets.QAbstractButton] [extrait de buttons.__doc__]
buttonText(self, button: int) -> str buttonText(self, button: int) -> str [extrait de buttonText.__doc__]
changeEvent(self, event: PySide2.QtCore.QEvent) changeEvent(self, event: PySide2.QtCore.QEvent) [extrait de changeEvent.__doc__]
checkBox(self) -> PySide2.QtWidgets.QCheckBox checkBox(self) -> PySide2.QtWidgets.QCheckBox [extrait de checkBox.__doc__]
clickedButton(self) -> PySide2.QtWidgets.QAbstractButton clickedButton(self) -> PySide2.QtWidgets.QAbstractButton [extrait de clickedButton.__doc__]
closeEvent(self, event: PySide2.QtGui.QCloseEvent) closeEvent(self, event: PySide2.QtGui.QCloseEvent) [extrait de closeEvent.__doc__]
critical critical(parent: PySide2.QtWidgets.QWidget, title: str, text: str, button0: PySide2.QtWidgets.QMessageBox.StandardButton, button1: PySide2.QtWidgets.QMessageBox.StandardButton) -> int [extrait de critical.__doc__]
customContextMenuRequested
defaultButton(self) -> PySide2.QtWidgets.QPushButton defaultButton(self) -> PySide2.QtWidgets.QPushButton [extrait de defaultButton.__doc__]
destroyed
detailedText(self) -> str detailedText(self) -> str [extrait de detailedText.__doc__]
escapeButton(self) -> PySide2.QtWidgets.QAbstractButton escapeButton(self) -> PySide2.QtWidgets.QAbstractButton [extrait de escapeButton.__doc__]
event(self, e: PySide2.QtCore.QEvent) -> bool event(self, e: PySide2.QtCore.QEvent) -> bool [extrait de event.__doc__]
finished
Icon
icon(self) -> PySide2.QtWidgets.QMessageBox.Icon icon(self) -> PySide2.QtWidgets.QMessageBox.Icon [extrait de icon.__doc__]
iconPixmap(self) -> PySide2.QtGui.QPixmap iconPixmap(self) -> PySide2.QtGui.QPixmap [extrait de iconPixmap.__doc__]
information information(parent: PySide2.QtWidgets.QWidget, title: str, text: str, button0: PySide2.QtWidgets.QMessageBox.StandardButton, button1: PySide2.QtWidgets.QMessageBox.StandardButton = PySide2.QtWidgets.QMessageBox.StandardButton.NoButton) -> PySide2.QtWidgets.QMessageBox.StandardButton [extrait de information.__doc__]
informativeText(self) -> str informativeText(self) -> str [extrait de informativeText.__doc__]
keyPressEvent(self, event: PySide2.QtGui.QKeyEvent) keyPressEvent(self, event: PySide2.QtGui.QKeyEvent) [extrait de keyPressEvent.__doc__]
objectNameChanged
open open(self) [extrait de open.__doc__]
question question(parent: PySide2.QtWidgets.QWidget, title: str, text: str, button0: PySide2.QtWidgets.QMessageBox.StandardButton, button1: PySide2.QtWidgets.QMessageBox.StandardButton) -> int [extrait de question.__doc__]
rejected
removeButton(self, button: PySide2.QtWidgets.QAbstractButton) removeButton(self, button: PySide2.QtWidgets.QAbstractButton) [extrait de removeButton.__doc__]
resizeEvent(self, event: PySide2.QtGui.QResizeEvent) resizeEvent(self, event: PySide2.QtGui.QResizeEvent) [extrait de resizeEvent.__doc__]
setButtonText(self, button: int, text: str) setButtonText(self, button: int, text: str) [extrait de setButtonText.__doc__]
setCheckBox(self, cb: PySide2.QtWidgets.QCheckBox) setCheckBox(self, cb: PySide2.QtWidgets.QCheckBox) [extrait de setCheckBox.__doc__]
setDefaultButton setDefaultButton(self, button: PySide2.QtWidgets.QMessageBox.StandardButton) [extrait de setDefaultButton.__doc__]
setDetailedText(self, text: str) setDetailedText(self, text: str) [extrait de setDetailedText.__doc__]
setEscapeButton setEscapeButton(self, button: PySide2.QtWidgets.QAbstractButton) [extrait de setEscapeButton.__doc__]
setIcon(self, arg__1: PySide2.QtWidgets.QMessageBox.Icon) setIcon(self, arg__1: PySide2.QtWidgets.QMessageBox.Icon) [extrait de setIcon.__doc__]
setIconPixmap(self, pixmap: PySide2.QtGui.QPixmap) setIconPixmap(self, pixmap: PySide2.QtGui.QPixmap) [extrait de setIconPixmap.__doc__]
setInformativeText(self, text: str) setInformativeText(self, text: str) [extrait de setInformativeText.__doc__]
setStandardButtons(self, buttons: PySide2.QtWidgets.QMessageBox.StandardButtons) setStandardButtons(self, buttons: PySide2.QtWidgets.QMessageBox.StandardButtons) [extrait de setStandardButtons.__doc__]
setText(self, text: str) setText(self, text: str) [extrait de setText.__doc__]
setTextFormat(self, format: PySide2.QtCore.Qt.TextFormat) setTextFormat(self, format: PySide2.QtCore.Qt.TextFormat) [extrait de setTextFormat.__doc__]
setTextInteractionFlags(self, flags: PySide2.QtCore.Qt.TextInteractionFlags) setTextInteractionFlags(self, flags: PySide2.QtCore.Qt.TextInteractionFlags) [extrait de setTextInteractionFlags.__doc__]
setWindowModality(self, windowModality: PySide2.QtCore.Qt.WindowModality) setWindowModality(self, windowModality: PySide2.QtCore.Qt.WindowModality) [extrait de setWindowModality.__doc__]
setWindowTitle(self, title: str) setWindowTitle(self, title: str) [extrait de setWindowTitle.__doc__]
showEvent(self, event: PySide2.QtGui.QShowEvent) showEvent(self, event: PySide2.QtGui.QShowEvent) [extrait de showEvent.__doc__]
StandardButton
standardButton(self, button: PySide2.QtWidgets.QAbstractButton) -> PySide2.QtWidgets.QMessageBox.StandardButton standardButton(self, button: PySide2.QtWidgets.QAbstractButton) -> PySide2.QtWidgets.QMessageBox.StandardButton [extrait de standardButton.__doc__]
StandardButtons
standardButtons(self) -> PySide2.QtWidgets.QMessageBox.StandardButtons standardButtons(self) -> PySide2.QtWidgets.QMessageBox.StandardButtons [extrait de standardButtons.__doc__]
standardIcon(icon: PySide2.QtWidgets.QMessageBox.Icon) -> PySide2.QtGui.QPixmap standardIcon(icon: PySide2.QtWidgets.QMessageBox.Icon) -> PySide2.QtGui.QPixmap [extrait de standardIcon.__doc__]
text(self) -> str text(self) -> str [extrait de text.__doc__]
textFormat(self) -> PySide2.QtCore.Qt.TextFormat textFormat(self) -> PySide2.QtCore.Qt.TextFormat [extrait de textFormat.__doc__]
textInteractionFlags(self) -> PySide2.QtCore.Qt.TextInteractionFlags textInteractionFlags(self) -> PySide2.QtCore.Qt.TextInteractionFlags [extrait de textInteractionFlags.__doc__]
warning warning(parent: PySide2.QtWidgets.QWidget, title: str, text: str, button0: PySide2.QtWidgets.QMessageBox.StandardButton, button1: PySide2.QtWidgets.QMessageBox.StandardButton) -> int [extrait de warning.__doc__]
windowIconChanged
windowIconTextChanged
windowTitleChanged

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

__init_subclass__, __subclasshook__, accept, adjustPosition, contextMenuEvent, DialogCode, done, eventFilter, exec_, extension, isSizeGripEnabled, minimumSizeHint, orientation, reject, result, setExtension, setModal, setOrientation, setResult, setSizeGripEnabled, setVisible, showExtension, sizeHint

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

__init_subclass__, __repr__, __subclasshook__, acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, backingStore, baseSize, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, contentsMargins, contentsRect, contextMenuEvent, contextMenuPolicy, create, createWindowContainer, createWinId, cursor, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, ensurePolished, enterEvent, find, focusInEvent, focusNextChild, focusNextPrevChild, 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, hideEvent, 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, leaveEvent, locale, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumSizeHint, minimumWidth, mouseDoubleClickEvent, mouseGrabber, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, move, moveEvent, nativeEvent, nativeParentWidget, nextInFocusChain, normalGeometry, overrideWindowFlags, overrideWindowState, paintEngine, paintEvent, palette, parentWidget, pos, previousInFocusChain, raise_, rect, redirected, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, RenderFlag, RenderFlags, repaint, resize, 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, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, sharedPainter, show, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeHint, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, toolTipDuration, topLevelWidget, underMouse, ungrabGesture, unsetCursor, unsetLayoutDirection, unsetLocale, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, wheelEvent, 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

__getattribute__, __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, 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__