Is there anybody here can help me view my records in MySQL to the tableView?
thanks....
Is there anybody here can help me view my records in MySQL to the tableView?
thanks....
Please help....
I'm new to Qt and I don't know much of the functions yet..
Heres my problem, I trying to view my records from MySQL to the tableView, but I haven't find a right code.
Please give me a simple code to this.
thanks...![]()
use this...
Qt Code:
model->setTable(trainingname);//trainingname-name of table to be viewed model->select(); model->setHeaderData(0, Qt::Horizontal, tr("CERTIFICATES")); model->setHeaderData(1, Qt::Horizontal, tr("CERTIFICATE NO.")); model->setHeaderData(2, Qt::Horizontal, tr("TRAINING CENTER")); model->setHeaderData(3, Qt::Horizontal, tr("DATE")); model->sort(0, Qt::AscendingOrder); view->setModel(model);To copy to clipboard, switch view to plain text mode
Last edited by jpn; 6th February 2008 at 07:39. Reason: missing [code] tags
thanks, i finally made it...![]()
I have added a tableView widget in my interface using the designer.
The problem is, I can't find a right code to view my records in it. I'm using MySQL database. Please help...
tnx...
What did you try so far? I thought you already made it.
J-P Nurmi
Bookmarks