Here is a QLineEdit that remembers and allows to navigate the history of lines entered in the widget