For a problem such as this, I usually create a "sandbox" project and attempt to duplicate the issue with as little code as possible. If the toy project performs as expected, then I start looking for difference from the real project that could account for the change in behavior. Other than that, I can't offer any advice on where else to look for the source of the problem.
Maybe some before and after screen shots would help illustrate the problem. Admittedly it is on Windows and not linux, but when I create empty table views as I am building a GUI and implement only the 4 required methods, the only thing shown is are the column headers if rowCount() returns 0 and data() returns an empty QVariant for everything. If I return 1 for rowCount(), I see an empty, one line grid of cells.What I just realized, the grid is not shown after the application starts, but only after I added at least one line into the model.
So in your case, I would confirm that rowCount() is actually returning what you think it should be. (And maybe examine the result of your call into the m_Node method before casting to int.)




Reply With Quote

Bookmarks