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 ?
Asked
Active
Viewed 581 times
1 Answers
1
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
- 13,334
- 2
- 38
- 57
-
well this is what i did i start with the first widget showing the loading massage and the secound widget loading the secound heavy page but 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 ? – user63898 Jun 17 '10 at 10:03
-
@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 Jun 17 '10 at 10:41
-
@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 Jun 17 '10 at 10:57