On 5/26/22 06:18, stan via users wrote:
So, the problem is in this function,

     def wheelEvent(self, e):
         h = self.horizontalScrollBar()
         if not self.verticalScrollBar().isVisible() and h.isVisible():
             numsteps = e.angleDelta().y() / 5

Python3 changed the default for division. Python2 would always give you an integer result from dividing integers, but Python3 will give you a float if the numbers are not evenly divisible. The simplest fix would be to change the "/" to a "//" (integer division).

             h.setValue(h.value() - numsteps)       <--------  here
             e.accept()
         else:
             QTableView.wheelEvent(self, e)
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to