
import sys
from qt import *
from Scroll import Scroll

class ScrollImpl(Scroll):
  def __init__(self,parent = None,name = None,fl = 0):
    Scroll.__init__(self,parent,name,fl)
    QObject.connect(self.pushButton1, SIGNAL('clicked()'), self.clicked)
    self.scrPlotView = QScrollView(self.frame8,"PlotScrollView", 0)
    self.box = QVBox(self.scrPlotView.viewport())
    self.scrPlotView.addChild(self.box)
    frame8Layout = QGridLayout(self.frame8,1,1,11,6,"frame8Layout")
    frame8Layout.addWidget(self.scrPlotView, 0, 0)


  def clicked(self):
    print "In clicked"
    l = QLabel('HELLO', self.box)

if __name__ == "__main__":
  a = QApplication(sys.argv)
  QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()"))
  w = ScrollImpl()
  for i in range(10):
    w.clicked()
  a.setMainWidget(w)
  w.show()
  a.exec_loop()
