[PyKDE] KHTMLPart and link navigation

Jim Bublitz jbublitz at nwinternet.com
Mon Jul 7 03:27:01 BST 2003


On Sunday July 6 2003 12:40, Timothy Bogdala wrote:
> Hello,
>
> I'm pretty new to PyKDE, and KDE programming. I set up a basic
> program that has a KHTMLPart. My problem is that once it loads
> a url, if you click any links on the page, nothing happens.
> How can I get it so that it navigates clicked links?

> TIA! Here's a sampling of my code. Once the return is pressed
> inside the url text box, it loads /., but none of the links
> actually do anything. How can I fix this?

I haven't actually done this, but I'd try two things:

1. Search http://www.kde.org for any KHTML related docs, 
articles, etc.

2. Check the KDE classref docs (you can get them at kde.org if 
you don't already have them) for KHTMLPart. My first guess would 
be that clicking a link will cause the 'urlSelected' signal to 
be emitted (easy to test), and you can connect a slot to that a 
probably call 'openURL' to load the link (also easy to test).

Jim




More information about the PyQt mailing list