[Qt-interest] Tree and Table view on same model

Jonathan Lee jlee975 at uwo.ca
Tue May 18 16:35:04 CEST 2010


Hi all,
  not an expert on Qt so I hope this isn't too trivial.

  I'd like a Tree and Table view on the same model, where
the tree shows a structure, and the table shows the leaves
of the selected item of the tree.

  Specifically I have a zip viewer which shows the dirs
on the left in a tree, and the files in that dir on the
right in a table.

  Right now I'm doing these two models separately, but
it seems redundant.

  What's the usual way of handling this? Make a proxy
model for both views, using a common model? Or is
there a cleaner way?

Thanks for any advice
--Jonathan



More information about the Qt-interest-old mailing list