QObject::connect(webview->page()->mainFrame(), SIGNAL(initialLayoutCompleted()), webview->page()->mainFrame(), SLOT(evaluateJavaScript("alert(); null")));
My code can be compiled but then happens nothing. evaluateJavascript is not the problem, because I have tested in standalone and it works fine. The signal is neither the problem, because I have done:
QObject::connect(webview->page()->mainFrame(), SIGNAL(initialLayoutCompleted()), webview, SLOT(close())));
And the app is closed properly. I think that the problem is related with the "webview->page->mainFrame()" part.
Thanks.