This is my code:
Qt Code:
  1. QSqlQuery query;
  2.  
  3. query.prepare("select :a / :b");
  4.  
  5. query.addBindValue( ui.a_lineEdit->text() );
  6. query.addBindValue( ui.b_lineEdit->text() );
  7.  
  8. query.exec();
  9.  
  10.  
  11. while (query.next()) {
  12. QString res = query.value(0).toString();
  13. ui.res_lineEdit->setText(res);
To copy to clipboard, switch view to plain text mode 
ui.a_lineEdit->text() is 9 and ui.b_lineEdit->text() is 3
If I try to +,- or * the result shows up in ui.res_lineEdit->setText(res), but when I try to divide it doesnt show me anything. Why?

Renan