def textbrowser(text=None):
 widget = QtWidgets.QTextBrowser()
 widget.setOpenExternalLinks(True)
 if text:
  widget.setText(text)
 return widget

def textbrowser ( text = None ) : widget = QtWidgets . QTextBrowser ( ) widget . setOpenExternalLinks ( True ) if text : widget . setText ( text ) return widget
create a qtextbrowser for the specified text .