I have a QListView that I'm using my own subclass of QAbstractTableModel to drive, with the usual setModel() call. However, I would like to set my QAbstractTableView's parent to the QListView when I create the model, mainly so that the model is destroyed when the widget is.
But this causes my program to crash with a EXC_BAD_ACCESS error (using QT 4.6 and Mac OS X 10.6 with XCode.) The stack trace points right back to my QAbstractTabelModel's initializer, which just passes the *parent parameter onto its own parent class.
What's wrong? I'm fairly new to QT, so I may not be understanding something completely correctly.
Thanks!
Bookmarks