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

Need to know when QTableWidget cells are selected



  • 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?


  • Lifetime Qt Champion

    Hi,

    Why not use currentCellChanged ?



  • 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.


Log in to reply