I have linked my QSqlQuerry model to a view that is supposed to display the result of the following querry

Qt Code:
  1. model->setQuery("SELECT * FROM user_info WHERE user_fname = 'lineEdit->text()' ");
To copy to clipboard, switch view to plain text mode 

I am trying to implement a simple search where a user enters a name (in lineEdit) and gets the record corresponding to that name.

the code i have there does not work,as i think lineEdit->text() is being seen as a literal, and thats waht the querry searches for, instead of what the user entered(the lineEdit's value).

How do i get the value of the lineEdit into the querry for it to give me the results i want.

Thanks for your attention.