[Qt-jambi-interest] QAbstractItemView: Creating a QModelIndex with a parent in Jambi?

Phil Mc phildev at undertheradar.org
Wed May 27 22:15:23 CEST 2009


Hello -
In Jambi, how does one create a QModelIndex with a parent index set?  The
relevant createIndex() methods which I'd use in implementing index() 
available in Jambi appear to take either an int ID or a QNativePointer,
none of which appear to be quite what I'm looking for.

The particular problem I'm working on is that I have a multi-column tree
view (with the expansion happening in column 1), and a set of data in a
database for it.  I'd like to supply data for the view directly through
database queries, rather than re-adding it to a standard model... but
while that works fine for 2-dimensional QTreeViews, and 1-column
QTreeViews (with QTreeModel), I believe I need to be able to supply an
index with a parent for my nodes in the TreeView.   Any suggestions?

thanks!
-phil





More information about the Qt-jambi-interest mailing list