[PyQt] Best model for a Catalog
nahueldefosse at yahoo.com.ar
Wed Aug 8 16:20:37 BST 2007
I'm trying to build a PyQt (4.3) frontend for my CdCat catalogs. They are a
compressed XML files, which basicaly describes some kind of filesystem like
<media> <!-- This could be a CD, DVD, or Network Drive -->
<media> ... </media>
So, a catalog has a lot of "media", each media has the actual filesystem
structure: files and folders.
The thing is, I want to represent that structure on a treeview (I'm using a
Tree Widget, right now), and a TableView, just like CDCat. The tree view has
the Catalog, as root, and medias as direct childs, when you open those media
childs, the files and folders unfold. And the table view? Well, when you
click on the catalog, the tree view show direct child, the medias. When you
click on a Media, it shows the direct childs of that media, the files and
folders on the top level of the CD, DVD, Net Drive, o whatever the media was.
I don't see how to model this thing on the Qt's model/view.
More information about the PyQt