self.statusBar().showMessage("Product added to database")
self.lineEdit_20.setText("")
self.lineEdit_21.setText("")
self.lineEdit_22.setText("")
time.sleep(3)
self.statusBar().showMessage("")
This is a part of my code in a PyQt5 project. Here is what i expect to happen:
- Status bar shows "Product added to database". Line edits show "".
- 3 seconds pass.
- Status bar shows "".
Yet here is what happens:
- Status bar shows "Product added to database".
- 3 seconds pass.
- Line edits show "". Status bar shows "".
sleep() function doesnt seem to work in correct order. What is the issue here?