Wait until a webpage finished loading to load the next one in a list

Posted by envy on Stack Overflow See other posts from Stack Overflow or by envy
Published on 2010-12-22T04:49:36Z Indexed on 2010/12/22 4:54 UTC
Read the original article Hit count: 183

Filed under:
|
|

Hi! I'm using PyQT webView to visit some webpages I have stored on a dictionary the code is something like this:

def loadLink(self, url):        
   manager = QNetworkAccessManager()
    request = QNetworkRequest(QUrl(url))        
    self.ui.webView.load(QUrl(visitar))     

def readUnreadLinks(self):
     print "Links to read: " + str(len(self.unreadLinks))
     for link in self.unreadLinks:
         print "link-> " + str(link)
         self.loadLink(link)

the problem is it doesn't wait until finished loading the web page and starts loading the next one. I want to load a webpage, wait until it finished loading and then load the next one.

Thanks, this is driving me crazy :)

© Stack Overflow or respective owner

Related posts about python

Related posts about pyqt