[Qt-interest] Does Qt provide a generic text caret?

Nikos Chantziaras realnc at arcor.de
Sun Feb 28 20:58:01 CET 2010


On Windows, one can show blinking text carets with routines like 
CreateCaret() and SetCaretPos().  Is there something similar in Qt or 
will I have to draw a caret and make it blink manually?  I'm currently 
trying to provide a caret for text that has been inserted in a 
QGraphicsScene with addSimpleText().

Note: I am not using the Rich Text Qt classes (like 
QTextBrowser/QTextEdit) which provide a caret, because I need 
pixel-exact positioning of text/images which the Rich Text framework 
doesn't seem to provide.  I chose the Graphics View framework instead to 
draw "documents" consisting of text and images because it allows me to 
use pixel coordinates rather than blocks and paragraphs.



More information about the Qt-interest-old mailing list