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. App crashes when using 2 TableWidgets
Forum Updated to NodeBB v4.3 + New Features

App crashes when using 2 TableWidgets

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 203 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.
  • DriftwoodD Offline
    DriftwoodD Offline
    Driftwood
    wrote on last edited by
    #1

    I'm using two QTableWidgets in a master/slave relationship. When I click on a customer name in the master, the slave shows me various customer information. Simple enough, you'd think.

    If I click a customer in the master and click nothing in the slave, then click another customer name in the master, all is okay. If I click a customer in the master and click a cell in the slave, then click back on the same customer name in the master, all is okay. But if I click any cell of the slave and then try to select another customer in the master, the app crashes. The only way to keep from crashing is to click in a spot in the slave table that isn't a cell.

    The only thing I'm using on the slave table is a cellChanged event. And simply clicking into a cell isn't changing anything. So I don't have a clue as to why I'm crashing when I select customer B in the master, followed by clicking in a cell of the slave, then clicking back in the master for customer A.

    What's happening under the hood here?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Run it via debugger and inspect the stack trace to see what is happening.
      It could be in some cases you are accessing a NULL ptr or you manage to
      get some sort of recursion happing with the signal.

      1 Reply Last reply
      0
      • DriftwoodD Offline
        DriftwoodD Offline
        Driftwood
        wrote on last edited by Driftwood
        #3

        @mrjj - I've decided that I'm not so far in to this that my work can be considered set in stone. So I'm going to tear it all down and start anew, learn how to properly use these Qt tools and never look back. I'll be here to ask more questions; you can count on that. But I'm done with trying to fit a size-6 shoe on a size-12 foot.

        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