If you want the text aligned to the left then don't change the default alignment (which shows the start of the string). You change this using QLineEdit::setAlignment() or the property editor in Qt Designer.