On Mon, Jun 20, 2011 at 00:14, Steven Sroka wrote:
> Hi everyone,
>
> Does anyone know how to clear the contents of a QLineEdit when a user
> sets focus to it (ie. clicks it, presses the tab key repeatedly,
> etc.)?

Subclass KLineEdit (which you`re using instead of QLineWidget, right?)
and reimplement focusInEvent() to call clear().

But why are you trying to do this? In general it seems like a bad
idea. If it`s to implement some kind of instructional message, see
QLineEdit::setPlaceholderText() or KLineEdit::setClickMessage().

Parker
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Reply via email to