If you only need to show an icon, an easy way is to use style-sheets:
lineedit = QtGui.QLineEdit()
lineedit.setStyleSheet("""QLineEdit {
background-image: url(:/images/magnifier.png);
background-repeat: no-repeat;
background-position: right;
background-clip: padding;
padding-right: 16px;
}""")
Ants Aasma
2009-08-30 06:25:40