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. Need to know when QTableWidget cells are selected
Qt 6.11 is out! See what's new in the release blog

Need to know when QTableWidget cells are selected

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 448 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    I have two QTableWidgets: one holds names; one holds pertinent info regarding each name. It's just a relational database setup. I'm using the cellClicked procedure to catch mouse clicks, and it works. I can click on a name in Table1 and Table2 shows the related data. But I'd like to be able to catch the scroll event, too. To do that, I setup cellEntered. That works intermittently, and only when I click my mouse in the cell. It doesn't work when I use the arrow keys or mouse wheel to navigate the table cells.

    How can I catch the scroll event when the mouse wheel (or arrow keys) selects a new cell in a QTableWidget?

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

      Hi,

      Why not use currentCellChanged ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        I looked at that, but the four ints freaked me out. To me, it looked like I was going to have track all that went on in the table. I'm happy that's not the case =)

        Thank you, SGaist.

        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