evaluateJavaScript("alert(); null")
is not the name of a slot, it's a fully formed function call. The QObject:connect()
fails because it expects the name of a slot, including the argument types, not a function call.
You need to provide your own slot function here, inside a class of yours, possibly inheriting QWebView. Then put that evaluateJavascript("...")
call inside that slot and connect SIGNAL(initialLayoutCompleted())
to it.