PyQT, Sharp Zaurus and color in the QTextBrowser

Sybren Stuvel sybrenUSE at YOURthirdtower.imagination.com
Mon Jul 14 15:21:24 EDT 2003


Hi there!

I'm a beginning Python programmer, and I like it a lot already. Since my
Sharp Zaurus has a fairly complete Python environment including PyQT, I
thought it would be the perfect language for programming some nice
things on my Zaurus. The thing I really missed on the Z was a good
Jabber client. That's why I'm building my own. Things are going good,
and in a few nights I've been able to get a fairly decent though
under-featured client.

There is a small thing annoying me, though I'm trying to show the name
of the person saying something in color: red = someone else, blue = me.
This is an example of the text I'm adding to the QTextBrowser:

<font color='#0000ff'><me></font>: hello world

It works like a charm on my PC, but on the Zaurus the text is all black.
Does anyone know how I can fix this?

~~~ brainwave flash ~~~

I just thought of something: what if the Z doesn't allow single quotes
around the "color" attribute? I gave it a try, and replaced the text
with:

<font color="#0000ff"><me></font>: hello world

And it works!

Anyways, perhaps this will be picked up by others having the same
problem. I'll stick around in this group and try to soak up as many good
knowledge from people as I can ;-)

A bit about myself: I'm a 24 year old, studying Computer Sciences at the
University of Amsterdam, I'm Dutch (like Guido ;-)) and I currently live
in Amsterdam too. I've been a programmer for half my life now :)

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 




More information about the Python-list mailing list