2021年4月27日星期二

Resetting button to original text pyqt5

I have a button called "start" and when I click the button, it becomes "Pause", when I click it again, it doesn't revert back to "start" it just stays as is and I need to be able to have it go back to the original text. How do I go about this? Right now I have this

    def button_click(self):          self.start_button.setText("Pause")  

This changes the start button to pause but I don't know how to go from pause to start.

https://stackoverflow.com/questions/67293036/resetting-button-to-original-text-pyqt5 April 28, 2021 at 10:39AM

没有评论:

发表评论