def mousePressEvent( self, event ): # handle a scroll event if event.button() == Qt.LeftButton and self.canScroll(): self._scrolling = True self._scrollInitY = event.globalY() self._scrollInitVal = self.verticalScrollBar().value() QApplication.setOverrideCursor(Qt.ClosedHandCursor) event.accept()
def enterEvent( self, event ): if self.canScroll(): QApplication.setOverrideCursor(Qt.OpenHandCursor)