Have you seen the example in the docs? One of the widgets it uses is a QLineEdit.