From 0e256098840b5fd0add6c08f1dd14d1bd2bd478a Mon Sep 17 00:00:00 2001 From: TilmanK Date: Tue, 7 Apr 2020 21:04:01 +0200 Subject: [PATCH] Fix annotation for QProgressDialog.setCancelButton MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ´button´ can be a nullptr in the C++ Source which is a None value in PyQt. --- PyQt5-stubs/QtWidgets.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PyQt5-stubs/QtWidgets.pyi b/PyQt5-stubs/QtWidgets.pyi index 0c683ba1..0ec7a4bc 100644 --- a/PyQt5-stubs/QtWidgets.pyi +++ b/PyQt5-stubs/QtWidgets.pyi @@ -6820,7 +6820,7 @@ class QProgressDialog(QDialog): def minimum(self) -> int: ... def wasCanceled(self) -> bool: ... def setBar(self, bar: QProgressBar) -> None: ... - def setCancelButton(self, button: QPushButton) -> None: ... + def setCancelButton(self, button: typing.Optional[QPushButton]) -> None: ... def setLabel(self, label: QLabel) -> None: ...