[PyQt] QSqlTableModel and complex queries

Aaron Digulla digulla at hepe.com
Wed Oct 8 21:11:37 BST 2008


Scott Frankel schrieb:
> 
> This seems beyond the scope of
> QSqlRelationalTableModel.

During my work on UPCScan, I've found that the QSqlRelationalTableModel
and the related table view are too buggy and too limited to be useful.
In the end, I've ripped all the code out again and wrote my own
implementation. Problems that I've encountered:

- When you change anything in the model, the view resets itself. You
lose the current selection and the current scroll position.

- You can't tell the model that you've just added a row to the table.

- I have a column with binary data. There is no way to inject a mapper
to turn this into something useful for the UI.

- I couldn't update the binary data with in setData().

Regards,

-- 
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://darkviews.blogspot.com/          http://www.pdark.de/


More information about the PyQt mailing list