'Set up the inspector.'

def inspect(self, _page):

    try:
        port = int(os.environ['QTWEBENGINE_REMOTE_DEBUGGING'])
    except KeyError:
        raise inspector.WebInspectorError("Debugging    is    not    enabled.    See    'qutebrowser    --help'    for    details.")
    url = QUrl('http://localhost:{}/'.format(port))
    self._widget.load(url)
    self.show()
