def __init__(self, parent=None): super(FlickCharm, self).__init__(parent=parent) self.flickData = {} self.ticker = QtCore.QBasicTimer() # The flick button to use self.button = QtCore.Qt.LeftButton # The time taken per update tick of flicking behavior self.tick_time = 20 # Allow a item click/press directly when AutoScroll is slower than # this threshold velocity self.click_in_autoscroll_threshold = 10 # Allow an item click/press to propagate as opposed to scrolling # when the cursor travelled less than this amount of pixels # Note: back & forth motion increases the value too self.travel_threshold = 20 self.max_speed = 64 # max scroll speed self.drag = 1 # higher drag will stop autoscroll faster