There are too many type errors in your sql strings.
please see below the hightlighted bold characters in red.
Try again!
QSqlQuery query;
query.exec(QObject::tr("create table tourism(id int primary key,name varchar)"));
query.exec(QObject::tr("insert into tourism values(0,'刘明')"));
query.exec(QObject::tr("insert into tourism values(1,'陈刚')"));
query.exec(QObject::tr("insert into tourism values(2,'王红')"));