私はSQLiteを使用して、テーブルに挿入しています。フォローウイング
QSqlQuery testQuery(QString("INSERT INTO test(testcol) VALUES(?)"));
testQuery.bindValue(0, someQStringObg);
testQuery.exec();
動作しますが、
QSqlQuery testQuery(QString("INSERT INTO test(testcol) VALUES(:val)"));
testQuery.bindValue(":val", someQStringObg);
testQuery.exec();
しないでください。testQuery.lastError().text() はNo query Unable to fetch 行を返します
どうしてこうなったのかさっぱり分からないけど、どうしても知りたい。