Sign in Join

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

Mailing lists / qt / 2009-05

QT WebKit how to use in Lazarus?

7 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

aime two

Hello,
I would like to migrate an application from Delphi to Lazarus, to distribute it under MacOSX, Linux and Zindozs.
I think that having to use the WebKit QT4.
But how to integrate this in a "panel", a "TabSheet"? Developer untrained amateur to the Object Language, I am in difficulty to achieve this.
Thank you in advance to those who could help me in guiding me, giving me a small program that does this and can I serve as an example.

Best regards.

Sorry for the translation (I'm French)

Felipe Monteiro de Carvalho
to aime two

I think you should start by asking Den to create bindings for the webkit, possibly with a separate unit and interface library. Then you can use it's API together with the Lazarus Qt Interface.

Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho
to Felipe Monteiro de Carvalho

Ah, and what exactly are you trying to use from QtWebKit? If you are trying to show simple html pages without javascript, then there is a Lazarus component that does that, don't remember how it's called

Felipe Monteiro de Carvalho
aime two
to Felipe Monteiro de Carvalho: Ah, and what exactly are you trying to use from QtWebKit? If you are trying to show…

thank you for your quick response,
I actually want to display "simple" HTML page, containing CSS. Component Lazarus (turbobrowser IPRO) knows not manage CSS, or even basic tags as "H1, H2, B, etc. ...". That is why I point me to QT WebKit, which is managing that.

Best regards

Felipe Monteiro de Carvalho a ?crit :

Show quoted text 5 lines
Ah, and what exactly are you trying to use from QtWebKit? If you are trying to show simple html pages without javascript, then there is a Lazarus component that does that, don't remember how it's called
aime two
to zeljko: bindings v 1.70 contains QWebKit, there's also demo for QWebKit usage.

thank you for your quick response,
I actually want to display "simple" HTML page, containing CSS. Component Lazarus (turbobrowser IPRO) knows not manage CSS, or even basic tags as "H1, H2, B, etc. ...". That is why I point me to QT WebKit, which is managing that.

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 ...

Best regards

zeljko a ?crit :

Show quoted text 14 lines
On Friday 01 May 2009 16:02, Felipe Monteiro de Carvalho wrote: > I think you should start by asking Den to create bindings for the > webkit, possibly with a separate unit and interface library. Then you > can use it's API together with the Lazarus Qt Interface. > bindings v 1.70 contains QWebKit, there's also demo for QWebKit usage. _______________________________________________ Qt mailing list http://www.lazarus.freepascal.org/mailman/listinfo/qt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/qt/attachments/20090501/ea441617/attachment.html>

Den Jean

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