this ASSERT(visualRow!=-1 ) in file qtableview.cpp at line 992 fails . What does this mean : visualRow equals -1?
i am using qt 4.6.0 on windows
Thanks !
this ASSERT(visualRow!=-1 ) in file qtableview.cpp at line 992 fails . What does this mean : visualRow equals -1?
i am using qt 4.6.0 on windows
Thanks !
Last edited by fmariusd; 4th February 2010 at 13:18.
............................. so ?![]()
It means that visualRow equals -1, which should never be the case. To say it more bluntly, it probably means you're doing something wrong in the code that uses the QTableView.
Horse sense is the thing that keeps horses from betting on people. --W.C. Fields
Ask Smart Questions
I was deleting rows with the mouse in a tableview and when i deleted the last row the above problem occured.(each row had an X button for delete)
Solution : select the last existing row in the tableview.
This an old post but may be for colleagues who may face the the same challenge. I have found very few ideas on this....I faced the same scenario that led me to this Thread. My tableview was attached to a proxy model and a delegate. The table content was controlled by a mapper index where by each time the mapper changes...the content had to change. THUS I had to empty the tableview with view->setModel(NULL) (otherwise a static persistentEditor was being created especially the first index(i.e index(0,0)) once current Mapper Index was changed) The Crash only happens when the current tableview index is left blank ...but then for my case it was crashing only when other indexes having some data before the Mapper Index...changed
Well, I solved it by emptying the tableview before submitAll() or revertAll() QSqlRelationalTableModel functions! Also before you close the window make sure to setFocus() on another widget (other than the tableview) on the window. All these are workarounds but If someone has a better solution please explain. I hope this helps someone!
Bookmarks