Hi - I have subclassed QAbstractItemView, but my implementation of the visualRect() method never gets called (and nothing ever gets painted). To ensure that the model is not empty, I overrode the setRootIndex, and I simply output the number of items in the model after calling the base class's implementation.
So, when setRootIndex gets called, I see that my model contains 23 items. Here's the code that tells me so:
Qt Code:
{ qDebug () << "there are" << model()->rowCount(rootIndex) << "items to view"; }To copy to clipboard, switch view to plain text mode
I do not understand why the base class (QAbstractItemView) does not begin calling my visualRect() function as it tries to lay out the 23 items in my model... any help would be appreciated! (Code attached)
// thanks // greg //
Bookmarks