[Qt-interest] Model/View Help

Colin Kern colin.kern at gmail.com
Mon Jun 28 17:38:48 CEST 2010


Hello all,

I'm new to models/view programming and I have a question.  Let's say I
have a C++ class that defines some member variables, and I have a
container storing a bunch of instances of this class (let's say it's a
QList).  What I want to do is display a table where each row is an
instance of this class, and each column is showing the value of one of
the member variables.  What's the best way to do this?  Should I use
QTableWidget or QTableView? Do I need to subclass one of the Qt model
classes, or can I use an existing one?  I've been trying to figure out
how to do this, but every solution I come up with seems more
complicated than it should be.

Thanks,
Colin Kern



More information about the Qt-interest-old mailing list