Quote Originally Posted by sophister View Post
I want to insert some virables into the table. If I don't use tr, how can I insert the virables then??
Qt Code:
  1. insert.exec( QString("insert into Person values (%4, \'%1\', \'%2\', %3)").arg(num + 1).arg(name).arg(sex).arg(age))
To copy to clipboard, switch view to plain text mode 

Pay attention to values type. I think "name" and "sex" are strings.