Currently, if the user clicks on a cell that is only partially visible, the window automatically scrolls over so that the cell is fully displayed. Is there any way to stop the table doing this? Thanks
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The scrolling is done by
QAbstractItemViewwhich call the virtual functionscrollTowith index the hintEnsureVisible. You can’t prevent the call, because it is done through a private timer, but you can change what thescrollTofunction does:And to still be able to scroll to an item manually, you could write another member function that would call
QTableWidget::scrollTo.