[Qt] [Re] QT WebKit how to use in Lazarus?

Den Jean Den.Jean at telenet.be
Fri May 15 21:53:46 CEST 2009


Hi,

>The v 1.70 does not contain examples of such component lazarus TPanel,
>TTabSheet, etc ... that encapsulate a twebview. And I do not know how ...

here is an example. 
http://users.telenet.be/Jan.Van.hijfte/qtforfpc/lclwebkit.tar.gz
http://users.telenet.be/Jan.Van.hijfte/qtforfpc/lclwebkit.png

I did not encapsulate everything in pascal OO,
at least it shows how to encapsulate in panel.

It also shows some fun direct signal/slot stuff,
very brief code, but you should know what you do :-)
  QObject_connect(L2Qt(BtnReload),Signal('pressed()'),WebView.Handle,Slot('reload()'));
  QObject_connect(WebView.Handle,Signal('titleChanged ( const QString & ) 
'),L2Qt(Application.MainForm),Slot('setWindowTitle ( const QString & )'));

You should use the hook_hook stuff normally.
  QWebView_urlChanged_Event(Method):=UrlChanged;
  WebViewHook:=QWebView_hook_create(Webview.Handle);
  QWebView_hook_hook_urlChanged(WebViewHook,Method);


Would you mind in return :-) hehe, check the bindings readmes 
and/or the lazarus Qt wiki's from the point of view 
of a LCL/Qt starter. I have no idea if it is easy or not 
to install lazarus with Qt.  Any improvements would be welcome.

thx in advance,

Den Jean




More information about the Qt mailing list