Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / qt / 2010-01

QT WebView set url

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Christian Sciberras

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.

Marcin Dębicki
to Christian Sciberras

1. Try QWebView_setUrl instead
3. I am pretty sure that there is no GWebElement there yet

2010/1/13 Christian Sciberras :

Show quoted text 38 lines
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. _______________________________________________ Qt mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/qt
Marcin D?bicki http://ksplayer.com - KSP Sound Player home
Christian Sciberras
to Marcin Dębicki

1. Ok thanks.
2./3. Perhaps I could use the "javascript:" protocol? I'll try both asap. Thanks.

Regards,
Chris.

2010/1/13 Marcin D?bicki :

Show quoted text 54 lines
1. Try QWebView_setUrl instead 3. I am pretty sure that there is no GWebElement there yet 2010/1/13 Christian Sciberras : > 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. > > _______________________________________________ > Qt mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/qt > -- Marcin D?bicki http://ksplayer.com - KSP Sound Player home _______________________________________________ Qt mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/qt
Christian Sciberras
to Den Jean

Thank you.

Den Jean wrote 14 lines
On Wednesday 13 January 2010 15:05:11 Christian Sciberras wrote: > search for examples in C, what I need to know is whether this sort of > functionality is available yet. > use Qt documentation, look at provided ./examples/webkit in Qt if any extra class is needed, just ask note:qwebelement is >= Qt 4.6 _______________________________________________ Qt mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/qt