[Qt-interest] Populating a QTreeView using data from SQL database
Esdras Beleza
listas at esdrasbeleza.com
Tue Sep 7 17:48:51 CEST 2010
Hi,
I have a SQL database with three tables: A, B and C. Each element of A has
many elements of B, and each element of B has many elements of C. It's A =
Artist, B = Albums and C = Songs: an artist has many albuns, each album has
many songs.
I'd like to show these data in a QTreeView, hierarchically. The first
level, obviously, is A's rows, and second is B and the third is C. Is there
some painless way to do that using a QTreeView and
a QSqlRelationalTableModel, or must I create some model class to handle the
data and then populate the treeview with it?
Thanks in advance,
Esdras
--
http://www.esdrasbeleza.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100907/7d4e4898/attachment.html
More information about the Qt-interest-old
mailing list