SomeRoot {
id: root
Repeater {
model: buttons
delegate: SomeDelegate {}
}
Component.onCompleted: {
[].slice.call(root.children, 0, root.children.length - 1).forEach(function (item) { console.warn(item.x) });
}
Repeater {
id: repeater
model: buttons
delegate: SomeDelegate {}
Component.onCompleted: {
for (var i = 0; i < repeater.count; ++i)
console.warn(repeater.itemAt(i).x);
}
}
bool ok = query.prepare("INSERT INTO messages (date, time, username, phone_number, text_message) VALUES (:date, :time, :name, :phone, :text)");
query.bindValue(":date","1");
query.bindValue(":time","1");
query.bindValue(":name","1");
query.bindValue(":phone","1");
query.bindValue(":text","1");
if (ok)
query.exec();
else
qDebug()<<query.lastError();