Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## 5.15.2.0 [unreleased]

### Added
* [#125](https://github.com/stlehmann/PyQt5-stubs/pull/125) on `QtWidgets.QMessageBox`, enumerators are also attributes of their enumerations
* [#99](https://github.com/stlehmann/PyQt5-stubs/pull/99) enable mypy's strict mode
* [#92](https://github.com/stlehmann/PyQt5-stubs/pull/92) add `Sequence` methods and `.__setitem__()` to `sip.array`
* [#94](https://github.com/stlehmann/PyQt5-stubs/pull/94) add several operators to `QIODevice.OpenMode` and `QIODevice.OpenModeFlag`
Expand Down
51 changes: 48 additions & 3 deletions PyQt5-stubs/QtWidgets.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6477,7 +6477,35 @@ class QMenuBar(QWidget):

class QMessageBox(QDialog):

class StandardButton(int): ...
class StandardButton(int):
NoButton = ... # type: 'QMessageBox.StandardButton'
Ok = ... # type: 'QMessageBox.StandardButton'
Save = ... # type: 'QMessageBox.StandardButton'
SaveAll = ... # type: 'QMessageBox.StandardButton'
Open = ... # type: 'QMessageBox.StandardButton'
Yes = ... # type: 'QMessageBox.StandardButton'
YesToAll = ... # type: 'QMessageBox.StandardButton'
No = ... # type: 'QMessageBox.StandardButton'
NoToAll = ... # type: 'QMessageBox.StandardButton'
Abort = ... # type: 'QMessageBox.StandardButton'
Retry = ... # type: 'QMessageBox.StandardButton'
Ignore = ... # type: 'QMessageBox.StandardButton'
Close = ... # type: 'QMessageBox.StandardButton'
Cancel = ... # type: 'QMessageBox.StandardButton'
Discard = ... # type: 'QMessageBox.StandardButton'
Help = ... # type: 'QMessageBox.StandardButton'
Apply = ... # type: 'QMessageBox.StandardButton'
Reset = ... # type: 'QMessageBox.StandardButton'
RestoreDefaults = ... # type: 'QMessageBox.StandardButton'
FirstButton = ... # type: 'QMessageBox.StandardButton'
LastButton = ... # type: 'QMessageBox.StandardButton'
YesAll = ... # type: 'QMessageBox.StandardButton'
NoAll = ... # type: 'QMessageBox.StandardButton'
Default = ... # type: 'QMessageBox.StandardButton'
Escape = ... # type: 'QMessageBox.StandardButton'
FlagMask = ... # type: 'QMessageBox.StandardButton'
ButtonMask = ... # type: 'QMessageBox.StandardButton'

NoButton = ... # type: 'QMessageBox.StandardButton'
Ok = ... # type: 'QMessageBox.StandardButton'
Save = ... # type: 'QMessageBox.StandardButton'
Expand Down Expand Up @@ -6506,14 +6534,31 @@ class QMessageBox(QDialog):
FlagMask = ... # type: 'QMessageBox.StandardButton'
ButtonMask = ... # type: 'QMessageBox.StandardButton'

class Icon(int): ...
class Icon(int):
NoIcon = ... # type: 'QMessageBox.Icon'
Information = ... # type: 'QMessageBox.Icon'
Warning = ... # type: 'QMessageBox.Icon'
Critical = ... # type: 'QMessageBox.Icon'
Question = ... # type: 'QMessageBox.Icon'

NoIcon = ... # type: 'QMessageBox.Icon'
Information = ... # type: 'QMessageBox.Icon'
Warning = ... # type: 'QMessageBox.Icon'
Critical = ... # type: 'QMessageBox.Icon'
Question = ... # type: 'QMessageBox.Icon'

class ButtonRole(int): ...
class ButtonRole(int):
InvalidRole = ... # type: 'QMessageBox.ButtonRole'
AcceptRole = ... # type: 'QMessageBox.ButtonRole'
RejectRole = ... # type: 'QMessageBox.ButtonRole'
DestructiveRole = ... # type: 'QMessageBox.ButtonRole'
ActionRole = ... # type: 'QMessageBox.ButtonRole'
HelpRole = ... # type: 'QMessageBox.ButtonRole'
YesRole = ... # type: 'QMessageBox.ButtonRole'
NoRole = ... # type: 'QMessageBox.ButtonRole'
ResetRole = ... # type: 'QMessageBox.ButtonRole'
ApplyRole = ... # type: 'QMessageBox.ButtonRole'

InvalidRole = ... # type: 'QMessageBox.ButtonRole'
AcceptRole = ... # type: 'QMessageBox.ButtonRole'
RejectRole = ... # type: 'QMessageBox.ButtonRole'
Expand Down