lundi 29 juillet 2019

inputMask fills QLineEdit with spaces

When i set inputMask to "99999" , run programm, 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 begining of lineEdit, instead it's on 5th character of the line

Aucun commentaire:

Enregistrer un commentaire