[Qt-interest] Owner draw QTextEdit?
Bob Hood
bhood2 at comcast.net
Wed Feb 4 05:53:33 CET 2009
Thanks for the response, Tony. I'll look at that.
Tony Rietwyk wrote:
> Hi Bob,
>
> I would say quite difficult, but doable by hacking the sources! You would
> need to paint the substitute characters, without affecting the layout
> handling. Have a look at QTextFragment.
>
> Tony.
>
>> Was this one too hard, or too easy?
>>
>>
>> Bob Hood wrote:
>>> I'm using v4.4.3, and I'm interested in enhancing the way
>> text is being
>>> displayed in a multi-line QTextEdit. Specifically, I want
>> to be able to
>>> draw character representations for things that are not
>> printable, like
>>> tabs, spaces and carriage returns. Looking through the
>> class (and its
>>> inheritance), I'm not seeing a straight-forward way of accomplishing
>>> this via some kind of "owner draw" mechanism. I also didn't see
>>> anything (or perhaps I missed it) in the examples.
>>>
>>> Can somebody point me in the right direction on this?
>> Perhaps a link to
>>> some code example that does custom drawing of text?
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
--
Render me gone, |||
Bob ^(===)^
---------------------------------oOO--(_)--OOo---------------------------------
With devotion's visage, and pious action, we do sugar o'er the devil himself.
- Hamlet, Act 3, Scene 1
More information about the Qt-interest-old
mailing list