title: PyQt5 QLCD Countdown
body: <p>i am working to build an app with countdown timer for gui see the Picture below:</p>
  
  <p><img src="https://i.stack.imgur.com/IVFQU.png" alt="enter image description here"></p>
  
  <p>On the bottom left you set the time. The orange button is to put the start time into the programm as well as into the green lcd.
  With the start Button I am trying to start the green lcd to countdown the seconds. However I cannot get this to work. The Programm just Exits doing nothing. I hope you can check my code an tell me what I Need to Change.
  EDIT: Tried to make it happen with a timer. Just displaying the atcual time.
  When running the updateLCD the app just find the new Code for gui and the code for Control below.</p>
  
  <p>It seems that the .display() function kills the app. If I comment it out Nothing happens but the app stays open.
  Thanks a lot in Advance.</p>
  
  <p>First .pyw code:
      from PyQt5 import QtCore, QtGui, QtWidgets</p>
  
  <pre><code>class Ui_set_time(object):
      def setupUi(self, set_time):
          set_time.setObjectName("set_time")
          set_time.resize(1125, 824)
          self.job_time = QtWidgets.QTimeEdit(set_time)
          self.job_time.setGeometry(QtCore.QRect(10, 770, 231, 41))
          self.job_time.setStyleSheet("font: 75 16pt \"MS Shell Dlg 2\";")
          self.job_time.setTime(QtCore.QTime(0, 0, 0))
          self.job_time.setObjectName("job_time")
          self.start_button = QtWidgets.QPushButton(set_time)
          self.start_button.setGeometry(QtCore.QRect(960, 40, 150, 90))
          self.start_button.setStyleSheet("font: 75 22pt \"MS Shell Dlg 2\";\n"
  "background-color: rgb(0, 255, 0);")
          self.start_button.setAutoDefault(False)
          self.start_button.setDefault(False)
          self.start_button.setFlat(False)
          self.start_button.setObjectName("start_button")
          self.pause_button = QtWidgets.QPushButton(set_time)
          self.pause_button.setGeometry(QtCore.QRect(960, 140, 150, 90))
          self.pause_button.setStyleSheet("background-color: rgb(255, 255, 0);\n"
  "font: 75 22pt \"MS Shell Dlg 2\";")
          self.pause_button.setObjectName("pause_button")
          self.finish_button = QtWidgets.QPushButton(set_time)
          self.finish_button.setGeometry(QtCore.QRect(960, 240, 150, 90))
          self.finish_button.setStyleSheet("background-color: rgb(0, 85, 255);\n"
  "font: 75 22pt \"MS Shell  2\";\n"
  "color: rgb(255, 255, 255);")
          self.finish_button.setObjectName("finish_button")
          self.label = QtWidgets.QLabel(set_time)
          self.label.setGeometry(QtCore.QRect(10, 720, 231, 40))
          self.label.setFrameShape(QtWidgets.QFrame.StyledPanel)
          self.label.setFrameShadow(QtWidgets.QFrame.Sunken)
          self.label.setLineWidth(10)
          self.label.setMidLineWidth(10)
          self.label.setObjectName("label")
          self.kill_Button = QtWidgets.QPushButton(set_time)
          self.kill_Button.setGeometry(QtCore.QRect(960, 720, 150, 90))
          self.kill_Button.setObjectName("kill_Button")
          self.label_2 = QtWidgets.QLabel(set_time)
          self.label_2.setGeometry(QtCore.QRect(260, 720, 261, 40))
          self.label_2.setFrameShape(QtWidgets.QFrame.StyledPanel)
          self.label_2.setFrameShadow(QtWidgets.QFrame.Sunken)
          self.label_2.setLineWidth(10)
          self.label_2.setMidLineWidth(10)
          self.label_2.setObjectName("label_2")
          self.lineEdit = QtWidgets.QLineEdit(set_time)
          self.lineEdit.setGeometry(QtCore.QRect(260, 770, 261, 41))
          self.lineEdit.setObjectName("lineEdit")
          self.remaining_time = QtWidgets.QLCDNumber(set_time)
          self.remaining_time.setGeometry(QtCore.QRect(0, 50, 911, 221))
          self.remaining_time.setStyleSheet("background-color: rgb(0, 0, 0);\n"
  "color: rgb(0, 255, 0);")
          self.remaining_time.setDigitCount(8)
          self.remaining_time.setSegmentStyle(QtWidgets.QLCDNumber.Flat)
          self.remaining_time.setObjectName("remaining_time")
          self.label_3 = QtWidgets.QLabel(set_time)
          self.label_3.setGeometry(QtCore.QRect(0, 10, 911, 40))
          self.label_3.setFrameShape(QtWidgets.QFrame.StyledPanel)
          self.label_3.setFrameShadow(QtWidgets.QFrame.Sunken)
          self.label_3.setLineWidth(10)
          self.label_3.setMidLineWidth(10)
          self.label_3.setObjectName("label_3")
          self.extra_time = QtWidgets.QLCDNumber(set_time)
          self.extra_time.setGeometry(QtCore.QRect(0, 320, 911, 221))
          self.extra_time.setStyleSheet("background-color: rgb(0, 0, 0);\n"
  "color: rgb(255, 0, 0);")
          self.extra_time.setDigitCount(8)
          self.extra_time.setSegmentStyle(QtWidgets.QLCDNumber.Flat)
          self.extra_time.setObjectName("extra_time")
          self.label_4 = QtWidgets.QLabel(set_time)
          self.label_4.setGeometry(QtCore.QRect(0, 280, 911, 40))
          self.label_4.setFrameShape(QtWidgets.QFrame.StyledPanel)
          self.label_4.setFrameShadow(QtWidgets.QFrame.Sunken)
          self.label_4.setLineWidth(10)
          self.label_4.setMidLineWidth(10)
          self.label_4.setObjectName("label_4")
          self.set_button = QtWidgets.QPushButton(set_time)
          self.set_button.setGeometry(QtCore.QRect(530, 720, 150, 90))
          self.set_button.setStyleSheet("background-color: rgb(255, 170, 0);\n"
  "font: 75 16pt \"MS Shell Dlg 2\";")
          self.set_button.setObjectName("set_button")
  
          self.retranslateUi(set_time)
          QtCore.QMetaObject.connectSlotsByName(set_time)
  
      def retranslateUi(self, set_time):
          _translate = QtCore.QCoreApplication.translate
          set_time.setWindowTitle(_translate("set_time", "Dialog"))
          self.job_time.setWhatsThis(_translate("set_time", "&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Hier die Zeit für den Auftrag eintragen&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"))
          self.job_time.setDisplayFormat(_translate("set_time", "HH:mm:ss"))
          self.start_button.setText(_translate("set_time", "Start"))
          self.pause_button.setText(_translate("set_time", "Pause"))
          self.finish_button.setText(_translate("set_time", "Fertig"))
          self.label.setText(_translate("set_time", "&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=\" font-size:14pt; font-weight:600;\"&gt;Vorgabe Zeit:&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"))
          self.kill_Button.setText(_translate("set_time", "Beenden"))
          self.label_2.setText(_translate("set_time", "&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=\" font-size:14pt; font-weight:600;\"&gt;Auftragsnummer:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"))
          self.label_3.setText(_translate("set_time", "&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=\" font-size:16pt; font-weight:600;\"&gt;Verbleibende Zeit:&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"))
          self.label_4.setText(_translate("set_time", "&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=\" font-size:16pt; font-weight:600;\"&gt;Überzogene Zeit:&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"))
          self.set_button.setText(_translate("set_time", "Setzen"))
  
  
  if __name__ == "__main__":
      import sys
      app = QtWidgets.QApplication(sys.argv)
      set_time = QtWidgets.QDialog()
      ui = Ui_set_time()
      ui.setupUi(set_time)
      set_time.show()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>Secondly the Control code:</p>
  
  <pre><code>from PyQt5 import QtWidgets, QtCore, QtGui
  import StortiTimer
  
  class ControlLCD(QtWidgets.QWidget):
      def __init__(self, parent = None):
          QtWidgets.QWidget.__init__(self, parent)
          self.ui = StortiTimer.Ui_set_time()
          self.ui.setupUi(self)
          self.timer = QtCore.QTimer()
          self.timer.timeout.connect(self.updateLCD)
          self.timer.start(1000)
  
  
      def updateLCD(self):
          self.currenttime = QtCore.QTime.currentTime()
          self.printtimer = self.currenttime.toString("hh:mm:ss")
          self.update
          self.self.ui.remaining_time.display(self.printtimer)
  
  
  if __name__ == "__main__":
      import sys
      app = QtWidgets.QApplication(sys.argv)
      c = ControlLCD()
      c.show()
      sys.exit(app.exec_())
  </code></pre>