It appears that in PyQt4 and 5, QFontDialog.getFont returns a tuple of (font, ok), but in PySide 1 and 2, that result is reversed to (ok, font).
Here's how I'm working around it for now:
result = QFontDialog.getFont(self.docFont, self, "Select Font")
if Qt.IsPyQt4 or Qt.IsPyQt5:
font, ok = result
else:
ok, font = result
I couldn't find anything documented about this difference in behavior other than literally comparing the method signatures in the docs for the libraries.
It appears that in PyQt4 and 5, QFontDialog.getFont returns a tuple of (font, ok), but in PySide 1 and 2, that result is reversed to (ok, font).
Here's how I'm working around it for now:
I couldn't find anything documented about this difference in behavior other than literally comparing the method signatures in the docs for the libraries.