[PyQt] python bindings around webkit

lkcl lkcl at lkcl.net
Wed Oct 15 15:23:21 BST 2008




Aaron Digulla wrote:
> 
> Quoting Luke Kenneth Casson Leighton <lkcl at lkcl.net>:
> 
> 
> I'd like to use the HTML edit mode of webkit (there is a demo editor  
> which comes with the webkit source).
> 

there is?  _great_.  i wasn't aware of that.  cool.  very handy.



>  My main issue with the editor is  
> that I need a way to calculate line and column information and I need  
> to do that *fast*. So I probably need access to the word wrap  
> information and I'm not sure if you could access that via the official  
> C++ API.
> 

i'm sure it is - although it's getting somewhat beyond my
knowledge boundary about webkit, so would be inclined to
suggest that you ask on webkit-dev.

certainly, via the glib bindings, you can do things like ask any
part of the DOM model what its width, height and absolute
positions are.  i know this is possible, because it's needed for
pyjamas, and also i know that such functions exist in javascript

i know that you can get the "text selection", you can get and
set the position of the text-cursor in a textarea or textbox
etc.

what i _don't_ know is how to translate that position into
actual on-screen x,y coordinates.  i feel somehow that it should
be possible.



> I need it as a powerful text editor in Enthought Traits  
> (https://svn.enthought.com/enthought/wiki/Traits). Traits itself is a  
> thin wrapper around PyQt and WX (so you have the choice of two widget  
> sets in your app).
> 
> Maybe you'll want to have a look at this kit, too.  
> If pyjd would be compatible to traits, that would give Python apps a  
> real choice.
> 
intriguing.  thanks.  i'll look at it.

-- 
View this message in context: http://www.nabble.com/python-bindings-around-webkit-tp19992523p19994583.html
Sent from the PyQt mailing list archive at Nabble.com.



More information about the PyQt mailing list