[Qt-interest] table values are not shown in database.
Sujan Dasmahapatra
sujan.dasmahapatra at gmail.com
Sat Jun 25 18:51:43 CEST 2011
Dear Pawel
Thanks so much. Its working with select... Thanks sujan
On Sat, Jun 25, 2011 at 9:03 AM, Someone <
Someone at gmail.com> wrote:
> According to the qt documentation setTable method does not select data
> from the table so you need to use select() after setTable.
>
> Kind Regards,
> Pawel
>
> On Sat, Jun 25, 2011 at 4:27 PM, Sujan Dasmahapatra
> <sujan.dasmahapatra at gmail.com> wrote:
> > QSqlTableModel *model = new QSqlTableModel(this, db); // db is the
> database
> > successfully opened.
> >
> > model->setTable("things");
> >
> > QTableView *view = new QTableView;
> >
> > view->setModel(model);
> >
> > view->show();
> > With this pice of code I can only see the header names of the table but
> down
> > there some values are not seen like this only book and qty but there are
> > some 3 values are there i cannot see them. PLease give me some
> suggestions.
> >
> > Book qty
> >
> >
> > --
> > Thanks & Regards
> > Sujan Dasmahapatra
> > B.E. (Aeronautics)
> > Bangalore, India
> > Ph:91-9900839788
> > mail id : sujan.dasmahapatra at gmail.com
> > yahoo msn : dasmahapatra.aerodynamics at yahoo.co.in
> > icq # 556023244
> > skype:sujan.dasmahapatra at skyepe.com
> > msn: sujan.dasmahapatra at hotmail.com
> >
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at qt.nokia.com
> > http://lists.qt.nokia.com/mailman/listinfo/qt-interest
> >
> >
>
--
Thanks & Regards
Sujan Dasmahapatra
B.E. (Aeronautics)
Bangalore, India
Ph:91-9900839788
mail id : sujan.dasmahapatra at gmail.com
yahoo msn : dasmahapatra.aerodynamics at yahoo.co.in
icq # 556023244
skype:sujan.dasmahapatra at skyepe.com
msn: sujan.dasmahapatra at hotmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110625/77a166d3/attachment.html
More information about the Qt-interest-old
mailing list