[Qt-interest] 2 QTextEdit: how to obtain a visible cursor in both at startup
Andre Somers
andre at familiesomers.nl
Fri Jan 14 17:48:53 CET 2011
Op Vr, 14 januari, 2011 5:11 pm, schreef Diego Iastrubni:
>>
>> Or overlay a QLabel at the correct position, or...
>>
>
> This will not work, as only one widget will contain the active cursor. The
> best approach is to emulate the fake cursor by painting it manually.
>
> BTW: this is *so* wrong... the text cursor is a singleton resource... this
> is a *bad* idea.
>
Let me clarify. The idea was to use a QLabel to display an image that just
looks like a cursor. Just a shortcut for having to subclass QTextEdit and
manipulate it's rendering.
André
More information about the Qt-interest-old
mailing list