im using Qwebkit to load heavy html page but mean while i don't what to show the user blank page , how can i in QT load the html page in the background and in the mean while show another HTML page in the same QwebKit widget ?
+1
A:
You could always fall back to using two widgets, perhaps managed by a QStackedWidget
, where you only flip them once loading is complete using the QWebPage::loadFinished( bool )
signal.
Troubadour
2010-06-17 09:00:39
well this is what i did i start with the first widget showing the loading massage and the secound widget loading the secound heavy pagebut the load finishd trigger never fired , so its not working do i need to set some thing that lets me load page in the background ?
2010-06-17 10:03:57
@user63898: Hmm, that's odd. I wouldn't have thought you would need to specify it was in the background as `QWebPage` works in widget-less environments too. I'll create a quick test-app to experiment with this, give me ten minutes.
Troubadour
2010-06-17 10:41:52
@user63898: My test works. Basically all I did was create a `QStackedWidget` with two `QWebView` widgets and load two different urls. Before loading the url into the second (hidden) web view I connected up to the loadFinished(bool) signal on the page and sure enough, my slot got called. Are you sure you are making the connection? I can post my code if you want?
Troubadour
2010-06-17 10:57:21