Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. "index from wrong model passed to mapFromSource" when trying to blank QTableView
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Moschops
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

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

      Greetz, Jeroen

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved