Here not able to set the text in button. If I don't call the external function then it updates the text but I don't want that.

I want to run the function and then update the button text. Can someone tell me how to update the button text when the signal is running the function?

It updates in the end not while running.

EDIT: I have added the external function that data from the uart.

```
def uart1_serial_read():
    device = serial.Serial(uart1, baudrate=115200, bytesize=8, parity='N', stopbits=1,
            timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)
    print('UART1: %s ' % device.name)
    run = True
    while run:
            #print (ser.readline())
            data=device.readline()
            print(data)

            if (data == TEST_END):
                print("TEST DONE *****")
                run = False

class Ui_MainWindow(object):
    # I setup my gui function geometry size,
    #def setupUi(self, MainWindow):
    def retranslateUi:
      self.pushButton_1.clicked.connect(self.run_iot_uart1)

  def signal_uart1(self, MainWindow):
      print("Calling signal here")
      _translate = QtCore.QCoreApplication.translate
      # set this button to test once its done
      self.pushButton_1.setText(_translate("MainWindow", "Running"))
      # This text doesn't update my button anyone can tell me why?
      self.pushButton_83.setText(_translate("MainWindow", "Running"))
      print("Green")

  def run_iot_uart1(self, MainWindow):
      _translate = QtCore.QCoreApplication.translate
      self.pushButton_1.setText(_translate("MainWindow", "start"))
      #calling external function
      uart1_serial_read()
      self.signal_uart1(MainWindow)

```