I am trying to fetch data from Sqlite to Table but data is not showing in table
Unsolved
General and Desktop
-
import QtQuick 2.7
import QtQuick.Window 2.0
import QtQuick.Controls 1.4Window
{
width: 700
height: 500
visible: trueComponent.onCompleted: { var query = "SELECT * FROM student"; var result = d_bmanager.execQuery(query); for (var i = 0; i < result.length; i++) { myModel.append({ name: result[i].name, fatherName: result[i].fatherName, motherName: result[i].motherName }); } } TableView { id: myTable anchors.fill: parent anchors.margins: 5 TableViewColumn { role: name title: "Name" width: 250 horizontalAlignment: Text.AlignHCenter } TableViewColumn { role: fatherName title: "Father's Name" width: 250 horizontalAlignment: Text.AlignHCenter } TableViewColumn { role: motherName title: "Mother's Name" width: 250 horizontalAlignment: Text.AlignHCenter } model: myModel }
}
-
Hi,
You have no error checks, no debug information added.
Nothing there to even know whether your code does something.