def browse(url): try: safe_open_url(QUrl(url, QUrl.TolerantMode)) except Exception: import traceback traceback.print_exc()
def link_activated(self, link): if unicode_type(link.scheme()) in ('http', 'https'): return safe_open_url(link) link = unicode_type(link.toString(NO_URL_FORMATTING)) self.link_clicked.emit(link)