Thanks a lot!
I ended up using a validator and it works great:
startEdit->setInputMask("xxxx/xx/xx xx:xx:xx");
QRegExp reg
("([1-2* ][ 0-9*][ 0-9*][ 0-9*])/([0-1* ][ 0-2*]|[0*][ 0-9*])/([0-3* ][ 0-1*]|[0-2* ][ 0-9*]) [0-2* ][ 0-9*]:[*0-5 ][ \\d*]:[*0-5 ][ \\d*]");
startEdit->setValidator(val);
startEdit->setInputMask("xxxx/xx/xx xx:xx:xx");
QRegExp reg("([1-2* ][ 0-9*][ 0-9*][ 0-9*])/([0-1* ][ 0-2*]|[0*][ 0-9*])/([0-3* ][ 0-1*]|[0-2* ][ 0-9*]) [0-2* ][ 0-9*]:[*0-5 ][ \\d*]:[*0-5 ][ \\d*]");
QValidator *val = new QRegExpValidator(reg, this);
startEdit->setValidator(val);
To copy to clipboard, switch view to plain text mode
Thanks for the help!
Bookmarks