[PyQt] How can i update QSqlRelationalTableModel
Linos
info at linos.es
Sat Aug 11 09:53:34 BST 2012
On 10/08/12 23:43, engdarkman89 wrote:
> Hi,
>
> I will try to explain the problem with the following scenario:
>
> Suppose we have two tables A and B, table B has a Foreign key column from A
> and we applied QSqlRelation to that column, now we insert/update a row in
> table A.
> The problem is that the QSqlRelation still see the old A table, how can i
> update the relation.?
>
> Appreciate any kind of help.
>
>
>
Hi,
you need to call relational_model.relationModel(column).select(), this update
the internal QSqlTableModel that .setRelation() creates.
Regards,
Miguel Angel.
More information about the PyQt
mailing list