PySide6 incorrect prototype QFontDialog.getFont()
-
QFontDialog function `getFont() documentation describes prototype:
static PySide6.QtWidgets.QFontDialog.getFont([parent=None])with return type
PyTuplewhich is not explained and incorrect in the example:Example:
ok = bool() font = QFontDialog.getFont(ok, self)Reverse engineered code works:
ok, font = QFontDialog.getFont() if ok: self.label.setFont(font)QInputDialog.getText() documentation describes return type
strinstead ofPyTyple:text, ok = QInputDialog.getText(self, 'Input Dialog', 'Enter your name:')Notice the inconsistency of
ok, fontandtext, ok.Am I correct that the documentation needs to be fully reviewed and updated? I could not find a
QFontDialogexample. -
Hi,
The documentation is, at least partially, generated out of the C++ version which triggers that kind of issue. You should check the bug report system and open an issue there if none already exists about this.