Simple Kinetic Scroller Revision 363231323863 (Mon Sep 26 2011 at 16:16) - Diff Link to this snippet: https://friendpaste.com/6D8cuZFXrVFFkqdUVK55x0 Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 1234567891011121314151617181920212223242526# Author: Tomi Saarinen, Rohea Oy# Licence: Do what ever you like with this but we guarantee nothingimport sysfrom PySide.QtCore import *from PySide.QtGui import *from PySide.QtMaemo5 import QMaemo5KineticScrollerclass SimpleKinetic(QMainWindow): def __init__(self): QMainWindow.__init__(self) self.items = ["1st item", "2nd item", "3rd item", "4th item", "5th item", "6th item", "7th item", "8th item", "9th item", "10th item", "11th item", "12th item"] self.listWidget = QListWidget(self) for i in range(len(self.items)): listItem = QListWidgetItem(QString(self.items[i])) self.listWidget.addItem(listItem) # Note that 'scroller' variable is very necessary here even if it doesn't seem to do much self.scroller = QMaemo5KineticScroller(self.listWidget) self.setCentralWidget(self.listWidget) if __name__ == '__main__': app = QApplication(sys.argv) sk = SimpleKinetic() sk.show() sys.exit(app.exec_())