PDA

View Full Version : QWebFrame getting errors: How to process



kiss-o-matic
2nd February 2014, 03:27
I posted this 2 days ago at Stack Overflow but got now love. So, here it goes.

------------

I rebooted a machine that was using `Xvfb`, and had a Qt program that uses `QWebPage` & `QWebFrame` extensively. Since the reboot, the program is not working and it looks like it's `QWebFrame::loadFinished( bool )` is reporting errors. My question is, how should I process these?

I've got a subclassed `QWebView`, which has a subclassed `QWebPage`. In that `QWebPage` I do:



connect( mainFrame(), SIGNAL( loadFinished( bool ) ), this, SLOT( read_page( bool ) ) );


In `QWebView::read_page( bool ok )`, I don't know what to do if ok is false. I would assume I'd want to reload (as it errors out a lot after executing a Javascript). And, I see that `QWebView` has `triggerPageAction()`... but I'm loading the URL's in `QWebFrame` which apparently doesn't. Kind of confused on that. I tried to do the page action on the `QWebView`, but nothing seemed to happen. That's to say, `loadFinished()` was not emitted.

If you can think of any other ways to trouble shoot, I'm all ears.