Use 'Component.onCompleted' handler to assign directly your url, or to call a function which will do that.
function setUrl(idOfWebView){
idOfWebView.url = "https://forum.qt.io"
}
WebView {
id: myWebView
anchors.fill: parent
// url: "set url here "
Component.onCompleted : { /* any JavaScript function or expressions */
// myWebView.url = "https://forum.qt.io" ( DIRECT )
//or u can call a function like this :
// setUrl(myWebView) // pass id of your webView to the function. ( FUNCTION )
}
}
LA