Use the
void QLineEdit::setInputMask ( const QString & inputMask )
method to set the mask to your needs (time,date....)
or you can create the lineEdit with:
QLineEdit::QLineEdit ( const QString & contents, const QString & inputMask, QWidget * parent, const char * name = 0 )
see qt docs for details
Cheers, Jovan