[PyQt] Trouble implementing QAbstractTableModel

Andreas Pakulat apaku at gmx.de
Thu Oct 23 09:11:18 BST 2008


On 22.10.08 23:49:55, comsatcat wrote:
> Hello,
> 
> I'm attempting to implement a QAbstractTableModel for a QTableView.  The
> data im attemptingto model is a single column hiarchy.
> 
> Say I  have the following data:
> 
> unasigned
> foo
>      bar
>          baby

But thats a Tree, not a Table. A table-model is specifically only for
table-like data, i.e. you have n rows and m column and each item has no
parent and no chilren.

If you want to model a tree you need to subclass QAbstractItemModel.

Andreas

-- 
Your present plans will be successful.


More information about the PyQt mailing list