Antoni4040 Antoni4040 - 1 year ago 114
Python Question

Some QLineEdit questions

I'm using Python with PyQt and I have a few problems with my


  1. First of all, I want to put text on them, but not the regular one, I mean the transparent text that disappears when you click on the

  2. How can I disable clicking on my

Answer Source

Pretty much like this:

linedit = QtGui.QlineEdit()
linedit.setPlaceholderText("My grey text which disappear when I click on it")

with Qt minimum version 4.7 and latest PyQt 4.