Probably using QLineEdit::setReadOnly() and possibly setFrame(). Obviously only good for text (a QLabel can display images also).