QWebView get response
Question: I have a python code with PySide that has a QWebView that shows google maps. I
just want to get the response each time that I do any request using the
QWebView widget.

I have searched info but there is no reference about getting a response with
PySide. If you need me to paste some code I will but I just have a simple
QWebView widget.

EDIT: You asked me for the code:

    
    
    from PySide.QtCore import *
    from PySide.QtGui import *
    import sys
    
    
    import pyside3
    
    class MainDialog(QMainWindow, pyside3.Ui_MainWindow):
    
        def __init__(self, parent=None):
            super(MainDialog,self).__init__(parent)
            self.setupUi(self)
            token_fb=""
            #self.Connect_buttom.clicked.connect(self.get_fb_token)
            self.Connect_buttom.clicked.connect(lambda: self.get_fb_token(self.FB_username.text(), self.FB_password.text()))
            #self.connect(self.Connect_buttom, SIGNAL("clicked()"), self.get_fb_token)
    
            #Change between locate and hunt
            self.MapsButton.clicked.connect(lambda: self.select_page_index(0))
            self.HuntButton.clicked.connect(lambda: self.select_page_index(1))
            ###########################
    
    
            self.webView.setHtml(URL)
        def select_page_index(self, index):  # To change between frames
            self.Container.setCurrentIndex(index)
    

I need the response from: `self.webView.setHtml(URL)` because depending on the
response my app has to do one thing or other.


Answer: Function `QWebView.setHtml()` has no response in the sense that it doesn't
return anything.

Maybe you want to listen to all links that are clicked and do something custom
with it.

    
    
    web_view = QtWebKit.QWebView()
    web_view.page().setLinkDelegationPolicy(QtWebKit.QWebPage.DelegateAllLinks)
    web_view.linkClicked.connect(your_handler)
    

Or maybe you want to do something when loading has finished. This is done by:

    
    
    web_view = QtWebKit.QWebView()
    web_view.loadFinished.connect(your_handler)
    

