def qtview(html, url=''):
    """View HTML in a Qt dialog"""
    try:
        from PyQt5.QtWebKitWidgets import QWebView
        from PyQt5.QtCore import QUrl
    except ImportError:
        from PyQt4.QtWebKit import QWebView
        from PyQt4.QtCore import QUrl
    helpView = QWebView()
    helpView.setHtml(html, QUrl(url))
    helpView.show()
    return helpView
