Because painting a QLineEdit with the blinking cursor is not as trivial as it seems for beginners... But after setting the label above the line edit just use QWidget::setContentsMargins() on the line edit (with the size of the label) and the label will stop to overlay the input text.
lineedit setContentsMargins() indents the lineedit box, it made the label out of the lineedit box.
Bookmarks