I'm not really accustomed to writing the UI in the code, so I need a few pointers. I'm trying to create a simple, horizontal scrolling dialog on my N900, but I can't figure out how to do this.
This is what I have so far:
def __init__(self,parent = None):
QDialog.__init__(self,parent)
#if name == None:
self.setWindowTitle('Testing scrolling')
self.scrollArea = QScrollArea(self)
self.scrollArea.setWidgetResizable(True)
self.scrollArea.setMinimumSize(100,150)
self.aWidget = QWidget(self.scrollArea)
self.aWidget.setMinimumSize(20,200)
self.aWidget.setSizePolicy( QSizePolicy.Expanding, QSizePolicy.Expanding)
self.scrollArea.setSizePolicy( QSizePolicy.Expanding, QSizePolicy.Expanding)
self.scrollArea.setWidget(self.aWidget)
scroller = self.scrollArea.property("kineticScroller").toPyObject()
scroller.setEnabled(True)
_layout = QGridLayout(self.aWidget)
_layout.setSpacing(60)
_layout.setMargin(11)
_layout.addWidget(QPushButton('Test0'),0,0)
_layout.addWidget(QPushButton('Test1'),0,1)
_layout.addWidget(QPushButton('Test2'),0,2)
_layout.addWidget(QPushButton('Test3'),0,3)
_layout.addWidget(QPushButton('Test4'),0,4)
_layout.addWidget(QPushButton('Test5'),0,5)
_layout.addWidget(QPushButton('Test6'),0,6)