[Qt] QT WebView set url

Christian Sciberras uuf6429 at gmail.com
Wed Jan 13 15:05:11 CET 2010


Hello people,

First of, eventhough I strongly dislike QT, I think you people made a
wonderful job for the bindings.
I've got a problem with 3 things related to the WebView/webkit:

-I need to programmatically set/navigate webview, I used this code but
it fails when used on a second time (no errors, just doesn't do
anything at all):

procedure WKNavigate(url:WideString);
var UrlH: QUrlH;
begin
  UrlH:=QUrl_create(@url);
  QWebView_load(WebView.Handle,UrlH); // webview.handle is correct,
I'm sure of it.
  QUrl_Destroy(UrlH);
end;

-I need to programmatically set the value of an input (type=text) box
on a page, without refreshing the page and given the element's ID.

-If my previous one doesn't trigger any kind of event, I would like
the ability to execute a predefined JS function (declared earlier in
page).

The last 2, I know they might require a lot of code, so I could just
search for examples in C, what I need to know is whether this sort of
functionality is available yet.

Kind regards,
Christian Sciberras.




More information about the Qt mailing list