How to show QDjango objects in a TableView

141 views
Skip to first unread message

yasir hantoush

unread,
Mar 24, 2012, 4:13:36 AM3/24/12
to QDjango
Is there a way to implement a model that could be binded to a table
view for QDjango Objects?

Jeremy Lainé

unread,
Mar 24, 2012, 5:19:58 AM3/24/12
to qdj...@googlegroups.com

Wouldn't a QSqlTableModel do the job?


http://qt-project.org/doc/qt-4.8/QSqlTableModel.html


Jeremy

Luis Lezcano Airaldi

unread,
Mar 24, 2012, 9:26:09 PM3/24/12
to qdj...@googlegroups.com
2012/3/24 Jeremy Lainé <jeremy...@m4x.org>:

> Wouldn't a QSqlTableModel do the job?
>
>
> http://qt-project.org/doc/qt-4.8/QSqlTableModel.html
>
>
> Jeremy
>
>
I subclassed QTableModel to make it able to access the database
through QDJango models. I think it's more consistent this way (only
one way to access the data).

Regards.

Jeremy Lainé

unread,
Mar 25, 2012, 4:39:05 AM3/25/12
to qdj...@googlegroups.com

On Mar 25, 2012, at 3:26 AM, Luis Lezcano Airaldi wrote:

> I subclassed QTableModel to make it able to access the database
> through QDJango models. I think it's more consistent this way (only
> one way to access the data).
>


Would you care to contribute a simple example so that it can be included with QDjango's examples?

Cheers,
Jeremy

Francisco Feijoo

unread,
May 22, 2013, 7:24:35 AM5/22/13
to qdj...@googlegroups.com
Hello,

I'm looking for a good ORM for Qt. I know this post is a bit old but what's the best way to show model data into Qt views.

Thanks and congratulations for this great framework.
Francisco.
Reply all
Reply to author
Forward
0 new messages