I have a bunch of data in a QTableWidget, and I would like to be able to scroll it to a specific column. I am currently using scrollToItem (self.item (0, col)). However, these are hardcodes of the row at 0. This causes problems if the user looks at row 100 and scrolls to a specific column, as it loses its vertical position in the table.
Is there a way to find which row the user is currently viewing inside QScrollArea that QTableWidget provides? If so, I could easily replace this default string with the correct one.
Perhaps there is another way to achieve this result with something like .ensureWidgetVisible ()? However, I'm not sure how to get the right widget that I would like to scroll or make visible.
source share