-2

SOLVED!!

I used a Qtimer to interrupt QMainWindow each one second and call to "getStartStatus" method:

    self.loadingLabel = QLabel('Starting...', self)
    self.loadingLabel.setGeometry(900, 700, 400, 200)
    self.loadingLabel.setFont(QFont('Arial', 20))
    self.loadingLabel.setStyleSheet('color:#C7BAD0')

    self.timerStartStatus = QTimer(self)
    self.timerStartStatus.timeout.connect(self.getStartStatus)
    self.timerStartStatus.start(1000)
  • 1
    As the [documentation explains](https://docs.python.org/3/library/functions.html#input), `input()` returns a string. Change to `if dato == '1':` – musicamante Mar 29 '22 at 22:33
  • Please trim your code to make it easier to find your problem. Follow these guidelines to create a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). – Community Mar 30 '22 at 09:22
  • I tried to take out the WHILE cycle and works but works and changes the label's text once. – Pablo.Eckerdt Mar 31 '22 at 01:40

1 Answers1

0

SOLVED!!

I used a Qtimer to interrupt QMainWindow each one second and call to "getStartStatus" method:

self.loadingLabel = QLabel('Starting...', self)
self.loadingLabel.setGeometry(900, 700, 400, 200)
self.loadingLabel.setFont(QFont('Arial', 20))
self.loadingLabel.setStyleSheet('color:#C7BAD0')

self.timerStartStatus = QTimer(self)
self.timerStartStatus.timeout.connect(self.getStartStatus)
self.timerStartStatus.start(1000)