It's often convenient to separate the SQL query from the actual values. This can be done using placeholders.
Qt supports two placeholder syntaxes: named binding and positional binding.
named binding:
QSqlQuery query;
query.prepare("INSERT INTO employee (id, name, salary) VALUES (:id, :name,...