There is a Search field with the magnification-lens and a greyed out \"search\" keyword at the top right corner of stackoverflow.com web site:
From QT 5.2 onwards you can do something like this. You should use pointers if you want to make it more flexible:
QIcon *ico; ico = new QIcon(":/images/search.ico"); searchEdit->addAction(*ico, QLineEdit::LeadingPosition);