title: i want pyqt5 label to update and display the value to create a simple countdown timer
body: <p>so I want to update the label every second so it creates a simple countdown timer,  I can see that the countdown timer works from the print statement but it just doesn't update the value in the label,  I tried using QTimer but couldn't get to know how it works, how can I fix ? are there any better methods I can use ?</p>
  <pre><code>from  PyQt5.QtWidgets import *
  from PyQt5.QtGui import QFont
  from PyQt5.QtCore import *
  import sys 
  import time
  
  class Window(QMainWindow) : 
      def __init__(self) : 
          super().__init__()
          self.setWindowTitle(&quot;Countdown Timer&quot;)
          self.setGeometry(0,0,500,500)
          self.Widgets()
          
      def Widgets(self) : 
          timer = 0
          #timer countdown Label
          self.Tcountdown = QLabel(str(timer),self)
          self.Tcountdown.resize(50,30)
          self.Tcountdown.move(250,90)
          self.Tcountdown.setFont(QFont(&quot;Arial&quot;,20))
          #Buttons : 
          self.startB = QPushButton(self)
          self.startB.resize(100,100)
          self.startB.move(250,200)
          self.startB.setText(&quot;Start&quot;)
          self.startB.clicked.connect(self.StartTimer)
          self.show()
          #the Pyqt Timer
      def StartTimer(self) : 
          for i in range(15,0,-1) : 
              timer = i 
              print(i)
              self.Tcountdown.setText(str(timer))
              time.sleep(1)
          
      
  
          
  app = QApplication(sys.argv) 
  window = Window()
  app.exit(app.exec_()) 
  </code></pre>