def mightRender(self, text): """ Test if a string can be rendered by this text engine :param str text: Text to be tested :return: True, if it can be rendered """ return PYSIDE2 or Qt.mightBeRichText(text)
def mightRender(self, text): """ Test if a string can be rendered by this text engine :param str text: Text to be tested :return: True, if it can be rendered """ try: return Qt.mightBeRichText(text) except AttributeError: return True