query.exec("create table mft " "(id integer primary key, " "parent integer, " "children blob, " "type integer, " "name text, " "item integer)");
QVariantList children; children.append(2); children.append(3); children.append(4); children.append(5); mftBase->setData(mftBase->index(0,2),QVariant(children));
QString string(mftBase->record(0).value("children").typeName());//string = "QString"QString string2(mftBase->record(0).value("children").toString());//string2 = "";
query.prepare("insert into mft (parent, children, type, name, item) " "values(?, ?, ?, ?, ?)"); query.addBindValue(0); QVariantList children; children.append(2); children.append(3); children.append(4); children.append(5); query.addBindValue(children); children.clear(); query.addBindValue(Subject); query.addBindValue("Alexey"); query.addBindValue(0); query.exec();
C++ (Qt) QVariantList children; children.append(2); children.append(3); children.append(4); children.append(5); QVariant d = QVariant(children); qDebug() << d.toString(); qDebug() << d.toByteArray();