views:

322

answers:

2
+4  A: 

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
Wow. Thank you :D
m3rLinEz
A: 

Antas Aasma - good anser! m3rLinEz Maybe its worth packing all buttons and text labels into one widget. In constructor of that widget connect all buttons. Expose only necessary signals and slots. Just to reduce code you write (and possibly increase reuse of this widget).

przemo_li