sprintf(sql, "insert into paper values(%d, \"%s\", \"%s\", \"%s\", \"%s\", %d)", id, type.toStdString().c_str(), content.toStdString().c_str(), solution.toStdString().c_str(), knowledge.toStdString().c_str(), difficulty);
系统提示: 警告: 不能通过‘...’传递有非简单旧数据类型‘class QString’的对象;调用会在运行时中止
上面的type, content, solution, knowledge均为QString类型