![]() |
gtkhtml2 widget in python
I had a lot of trouble finding information on how to display a bit of HTML in my python/gtk application (the webkit module for QT application makes it way easier and nicer than in gtk, but QT doesn't seem to have the hildon widgets readily available quite yet). So, after a lot of looking around, here is a small example on how to use gtkhtml2 with finger scrolling, on Maemo Fremantle. One little gripe that remains is that it does text selection at the same time as scrolling.
Code:
import hildon |
Re: gtkhtml2 widget in python
Thanks, that's exactly what i was looking for!
But there is a problem: "link_clicked" doesn't seem to be triggered in my script. Even in your example. |
Re: gtkhtml2 widget in python
Hmm, it works for me, both in scratchbox and on the n900.
If you start it from the shell, are you getting any error messages in there? |
Re: gtkhtml2 widget in python
ok, was my fault :)
The links are extremely difficult to hit. At random it works to click one, but I don't know how it happened. |
Re: gtkhtml2 widget in python
Yes, it is quite tricky to hit the links right. Using the stylus or finger nails are a must. But it is not made to be a full featured web-browser, it's just to display a bit of HTML formatting. If you're generating the HTML yourself, using images for links might make it easier to click.
|
Re: gtkhtml2 widget in python
I'm displaying a search result list, so images are no option for me.
I switched to hildon.TouchSelector, which works quite well for my app. |
All times are GMT. The time now is 15:02. |
vBulletin® Version 3.8.8