title: How do I change my widget index with a timer?
body: <p>OK, I trying create a tick so I can show elapsed time and change screens after a time delay.  The pyqt program is as follows:</p>
  
  <pre><code># -*- coding: utf-8 -*-
  
  # Form implementation generated from reading ui file 'mainwindow.ui'
  #
  # Created: Tue May 10 08:43:50 2016
  #      by: PyQt4 UI code generator 4.9.3
  #
  # WARNING! All changes made in this file will be lost!
  
  from PyQt4 import QtCore, QtGui
  import time
  
  try:
      _fromUtf8 = QtCore.QString.fromUtf8
  except AttributeError:
      _fromUtf8 = lambda s: s
  
  class Ui_MainWindow(object):
      def setupUi(self, MainWindow):
          MainWindow.setObjectName(_fromUtf8("MainWindow"))
          MainWindow.setEnabled(True)
          MainWindow.resize(800, 480)
          self.centralWidget = QtGui.QWidget(MainWindow)
          self.centralWidget.setObjectName(_fromUtf8("centralWidget"))
          self.stackedWidget = QtGui.QStackedWidget(self.centralWidget)
          self.stackedWidget.setGeometry(QtCore.QRect(0, 0, 800, 480))
          palette = QtGui.QPalette()
          brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
          brush.setStyle(QtCore.Qt.SolidPattern)
          palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
          brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
          brush.setStyle(QtCore.Qt.SolidPattern)
          palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
          brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
          brush.setStyle(QtCore.Qt.SolidPattern)
          palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
          brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
          brush.setStyle(QtCore.Qt.SolidPattern)
          palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
          brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
          brush.setStyle(QtCore.Qt.SolidPattern)
          palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
          brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
          brush.setStyle(QtCore.Qt.SolidPattern)
          palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
          self.stackedWidget.setPalette(palette)
          self.stackedWidget.setObjectName(_fromUtf8("stackedWidget"))
          self.page_1 = QtGui.QWidget()
          self.page_1.setObjectName(_fromUtf8("page_1"))
          self.Software_2 = QtGui.QLabel(self.page_1)
          self.Software_2.setGeometry(QtCore.QRect(550, 310, 241, 71))
          font = QtGui.QFont()
          font.setFamily(_fromUtf8("DejaVu Sans"))
          font.setPointSize(32)
          font.setBold(False)
          font.setWeight(50)
          self.Software_2.setFont(font)
          self.Software_2.setObjectName(_fromUtf8("Software_2"))
          self.model_2 = QtGui.QLabel(self.page_1)
          self.model_2.setGeometry(QtCore.QRect(90, 300, 171, 91))
          font = QtGui.QFont()
          font.setFamily(_fromUtf8("DejaVu Sans"))
          font.setPointSize(32)
          font.setBold(False)
          font.setWeight(50)
          self.model_2.setFont(font)
          self.model_2.setObjectName(_fromUtf8("model_2"))
          self.ModNum_2 = QtGui.QLabel(self.page_1)
          self.ModNum_2.setGeometry(QtCore.QRect(110, 370, 101, 41))
          font = QtGui.QFont()
          font.setFamily(_fromUtf8("DejaVu Sans"))
          font.setPointSize(24)
          font.setBold(False)
          font.setWeight(50)
          self.ModNum_2.setFont(font)
          self.ModNum_2.setObjectName(_fromUtf8("ModNum_2"))
          self.logo_3 = QtGui.QLabel(self.page_1)
          self.logo_3.setGeometry(QtCore.QRect(100, 60, 571, 191))
          self.logo_3.setText(_fromUtf8(""))
          self.logo_3.setPixmap(QtGui.QPixmap(_fromUtf8("../../logo.ppm")))
          self.logo_3.setObjectName(_fromUtf8("logo_3"))
          self.SoftNum_2 = QtGui.QLabel(self.page_1)
          self.SoftNum_2.setGeometry(QtCore.QRect(570, 370, 171, 41))
          font = QtGui.QFont()
          font.setFamily(_fromUtf8("DejaVu Sans"))
          font.setPointSize(24)
          self.SoftNum_2.setFont(font)
          self.SoftNum_2.setObjectName(_fromUtf8("SoftNum_2"))
          self.stackedWidget.addWidget(self.page_1)
          self.page_2 = QtGui.QWidget()
          self.page_2.setObjectName(_fromUtf8("page_2"))
          self.logo_2 = QtGui.QLabel(self.page_2)
          self.logo_2.setGeometry(QtCore.QRect(100, 60, 571, 191))
          self.logo_2.setText(_fromUtf8(""))
          self.logo_2.setPixmap(QtGui.QPixmap(_fromUtf8("../../logo.ppm")))
          self.logo_2.setObjectName(_fromUtf8("logo_2"))
          self.pbElectro = QtGui.QPushButton(self.page_2)
          self.pbElectro.setGeometry(QtCore.QRect(70, 360, 171, 32))
          self.pbElectro.setObjectName(_fromUtf8("pbElectro"))
          self.pbWater = QtGui.QPushButton(self.page_2)
          self.pbWater.setGeometry(QtCore.QRect(350, 360, 131, 32))
          self.pbWater.setObjectName(_fromUtf8("pbWater"))
          self.pbMatain = QtGui.QPushButton(self.page_2)
          self.pbMatain.setGeometry(QtCore.QRect(572, 360, 181, 32))
          self.pbMatain.setObjectName(_fromUtf8("pbMatain"))
          self.stackedWidget.addWidget(self.page_2)
          MainWindow.setCentralWidget(self.centralWidget)
  
          self.retranslateUi(MainWindow)
          QtCore.QMetaObject.connectSlotsByName(MainWindow)
  
      def retranslateUi(self, MainWindow):
          MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
          self.Software_2.setText(QtGui.QApplication.translate("MainWindow", "Software", None, QtGui.QApplication.UnicodeUTF8))
          self.model_2.setText(QtGui.QApplication.translate("MainWindow", "Model", None, QtGui.QApplication.UnicodeUTF8))
          self.ModNum_2.setText(QtGui.QApplication.translate("MainWindow", "3000", None, QtGui.QApplication.UnicodeUTF8))
          self.SoftNum_2.setText(QtGui.QApplication.translate("MainWindow", "V 0.00.01", None, QtGui.QApplication.UnicodeUTF8))
          self.pbElectro.setText(QtGui.QApplication.translate("MainWindow", "Electrostatic Filtration", None, QtGui.QApplication.UnicodeUTF8))
          self.pbWater.setText(QtGui.QApplication.translate("MainWindow", "Water Removal", None, QtGui.QApplication.UnicodeUTF8))
          self.pbMatain.setText(QtGui.QApplication.translate("MainWindow", "Maintenance Mode", None, QtGui.QApplication.UnicodeUTF8))
  </code></pre>
  
  <p>Then my main program is this:</p>
  
  <pre><code>import sys
  from form import *
  import time
  
  from PyQt4.QtCore import QTimer
  from PyQt4.QtGui import QApplication
  
  global myapp
  start = time.time()
  
  
  
  class MyDialog(QtGui.QMainWindow):
        def __init__(self, parent=None):
            QtGui.QWidget.__init__(self, parent)
            self.ui = Ui_MainWindow()
            self.ui.setupUi(self)
        def Change():
              print('tick')
              Ui_MainWindow.setCurrentIndex(1)
  
      #self.ui.pushButton.clicked.connect(self.Change)
  
  if __name__ == "__main__":
        app = QtGui.QApplication(sys.argv)
        myapp = MyDialog()
        myapp.show()
        timer = QTimer()
        timer.timeout.connect(MyDialog.Change)
        timer.start(1000)
        sys.exit(app.exec_())
  </code></pre>
  
  <p>The line Ui_MainWindow.setCurrentIndex(1) does not work and gives me an error.
  I've tried a lot of things and usually get into trouble with "self".</p>
  
  <p>I could use some help and possibly a little consulting.</p>