Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, March 2002
Forcing a cursor in QLineEdit?


Message 1 in thread

Hello,

I have a home grown widget containing a QLineEdit as a cell in a QTable. 
If the user tabs out of the cell the cell contents are validated. If 
validation fails focus is returned to the cell but the blinking cursor 
has disappeared. As soon as a character is added the cursor reappears, 
but until that point the cell doesn't have an active cursor.

The only public function I've found that can "revive" the cursor and its 
blink is the insert() function, so my current workaround is to clear() 
the editor then insert() the original text. Is there a better way?

-- 
 [ signature omitted ]