Python PyQt WebView Load Multiple Local Web Pages -


i building application uses twitter api return posts based on keyword search. application retrieves posts every minute , updates multiple webviews contain different information. have 4 different web views:

  1. display posts retrieved
  2. display charts
  3. display tag cloud
  4. display other statistical information

i using threading retrieve data api. application runs until point when need load local html files have been updated include new html shows information. when loads 4 pages freezes application 20 seconds.

this code calls 'updatewebviews' function once workerthread has done job:

self.workerthread = updatethread()         self.connect(self.workerthread, qtcore.signal('emit'), self.updatewebviews()) 

the below code updates 4 pages , freezes application:

def updatewebviews(self):              print('updating web views')              self.postretrievedtext.load(                 (qtcore.qurl("posts.html")))              self.tagcloudwebview.load(                 (qtcore.qurl("tagcloud.html")))              self.barchartwebview.load(                 (qtcore.qurl("index.html")))              self.webview.load(                 (qtcore.qurl("statistics.html")))              print('finished updating web views') 

i've checked other posts on forum don't quite solve problem. need load each page without crashing gui.

thanks!

jimmy

so 1 1 commented out calls load each webpage. 'tagcloud.html', 'statistics.html' , 'index.html' loaded instantly. problem 'posts.html'.

'posts.html' contained call googles fonts , changed font of text on webpage. took google font out , no more crashing!


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -