tags:

views:

42

answers:

1

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
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 ?
@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
@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