I see the way to modify the colors in a single touch. What I did in my text editor widget is to define a language definition and colors definitions in different XML files. This way the colors and syntax are easy to change.

If you want to check my code, or at least the ideas I used, feel free to do it:
http://code.google.com/p/qtedit4/wiki/QsvEditorBeta