[WebKit-devel] KDE Webkit status update...

Michael Howell mhowell123 at gmail.com
Sat Oct 3 23:06:14 CEST 2009


On Saturday 03 October 2009 09:43:40 Dawit A. wrote:
> 1.) Add the search bar to KWebView's parent widget layout when it is first
> created and call update on the layout. This is a matter of adding few lines
>  of code to what is now KWebView::searchBar() and changing that function
>  into a slot that gets invoked when CTRL+F is pressed. I have done this in
>  my local copy and it works. However, this is not a robust solution at all!
>  What if the application using kdewebkit wants to add its own widgets such
>  as a save password bar (KWallet integration) for example ?
> 
> 2.) For a more robust solution we need to do something like what KHTML
>  does. It has a KHTMLViewBar class which manages widgets you want to add to
>  the view. KHTML then creates two instance of the view bar, one at the top
>  and bottom, and allow you to add your own widgets to these bars. This is
>  what KHTML uses to add the password and search bar widgets to its view. We
>  can do the a similar thing by creating a public KWebViewBar class and
>  exposing the instances we create through public member functions, e.g.
>  topViewBar() and bottomViewBar(). This is probably a better approach in
>  the long run, no ?
Either way KWebView messes with its parent widget in unexpected ways. 
Particularly, ways that QWebView does not. The way I do it, KWebView acts as a 
normal, self-contained widget. Besides, I don't expose internal APIs. I expose 
a QWidget.

I'm surprised that KHTMLWidget messes with it's parents. They have control 
over how KHTML draws, so they can put the find bar inside it.

-- 
Please don't send HTML-only mail (if you like, you can use multipart). If you 
forward messages, please clean off the garbage. Thanks! 
Michael Howell 
mhowell123 at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/webkit-devel/attachments/20091003/f3c4c975/attachment.sig 


More information about the WebKit-devel mailing list