When I set inputMask
to "99999" , run program, and mouse clicking to QLineEdit
, it filled with 5 spaces, so I have to delete the spaces first, and only then put the value I need.
I've tried to set cursor position to 0 ,but it doesn't work. Also tried to set text to empty string, same result.
ui->engineCapacity_lineEdit->setInputMask("99999");
ui->engineCapacity_lineEdit->setCursorPosition(0);
ui->engineCapacity_lineEdit->setText("");
It suppose to put cursor to the beginning of lineEdit
, instead it's on 5th character of the line