Similar to #18, passing a QtCore.Qt.EventPriority to QtWidgets.QApplication.postEvent results in an error from mypy.
For example:
QtWidgets.QApplication.postEvent(self, myEvent, QtCore.Qt.LowEventPriority)
Results in the following mypy error:
error: Argument 3 to "postEvent" of "QCoreApplication" has incompatible type "EventPriority"; expected "int" [arg-type]
PySide2 incorrectly annotated this as follows:
def postEvent(receiver: PySide2.QtCore.QObject, event: PySide2.QtCore.QEvent, priority: int = PySide2.QtCore.Qt.EventPriority.NormalEventPriority) -> None
PySide6 also annotates this somewhat incorrectly, although PySide6.QtCore.Qt.EventPriority is now an enum.IntEnum so the annotation is technically correct:
def postEvent(receiver: PySide6.QtCore.QObject, event: PySide6.QtCore.QEvent, priority: int = Instance(Qt.NormalEventPriority)) -> None