Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
5.11.0
-
None
Description
In the documentation for QFontDialog.getFont(...) static methods, these functions show an example that indicates the tuple is returned as (ok, font), when in fact the code returns a tuple of (font, ok)
(ok, font) = QFontDialog.getFont(self)
The "Return type" while accurate, is also not clear what is returned in the PyTuple - and one has to resort to the (incorrect, see above) example code:
Parameters: parent – PySide2.QtWidgets.QWidget Return type: PyTuple
Additionally, the description body talks about the 'ok' parameter, and whether or not it is null or not - which is specific to the C++ implementation, given that Python just returns ok in the PyTuple returned.
Both variants of getFont are affected by this.