PDA

View Full Version : How to set data



sonuani
21st February 2008, 10:12
hi,
Actually i have a QLineedit in designer which has 0 initially.When i want to enter data into the QLineedit then this 0 has to be cleared and i should be able to enter data.
I am able to do it manually.But when i click that control then immediately,it should be cleared off.
Thanks

jacek
21st February 2008, 20:15
You can install an event filter to intercept the QFocusEvent and clear the QLineEdit (be sure to check the focus reason).

See: QObject::installEventFilter()