Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

"index from wrong model passed to mapFromSource" when trying to blank QTableView



  • I have a QTableView linked to a model that sometimes undergoes a endResetModel() call, shortly after a beginResetModel() call :)

    In some cases (when I'm trying to have the QTableView show nothing at all, not even an empty grid) I get "index from wrong model passed to mapFromSource" output to screen.

    However, the model linked to the QTableView never changes. It gets set once at the start, and that's it. I've stuck a breakpoint at the line where the model is set, and it happens once only, at the start. As such, I'm a bit stumped. Could this mean something like an invalid index, rather than one from an entirely wrong model?



  • How do you "blank" the view?? That might cause a index problem?


Log in to reply