(PyQt5)
I have my first gui program that is in the VERY rough stages. Here's what it looks like just for reference:
Screen Shot 2016-06-29 at 13.48.50.jpg
Here's some heavily abridged code it runs on:

Qt Code:
  1. class MyWidget(QWidget):
  2. def __init__(self):
  3. super().__init__()
  4. self.main_screen()
  5.  
  6. def main_screen(self):
  7. self.button_1 = RightSideButton("Enter")
  8. # RSB is my own class, to normalize the size of the buttons to 1 inch square on screen, extending QPushButton
  9. self.main_input = QLineEdit()
  10. # sets everything else up
  11.  
  12. self.reset()
  13. self.showMaximized()
  14.  
  15. def reset(self):
  16. # does stuff
  17. self.button_1.clicked.connect(self.run_main)
  18. self.main_input.returnPressed.connect(self.button_1.click)
  19.  
  20. def run_main(self):
  21. # does stuff
  22. self.button_1.clicked.connect(self.run_next) # this line doens't seem to do anything
  23.  
  24. def run_next(self):
  25. # does stuff
  26. self.reset()
To copy to clipboard, switch view to plain text mode 

In this, button_1 is the one on the bottom right. I'm trying to have the program run through different "modes" as it were, where in each mode it does different things when you type something in the main input and hit enter or the button on the lower right.

It works at first, going through run_main() as it should, but when it gets to the end (line 21) and tries to "change modes" by changing the slot of the button signal, it doesn't work and it just goes back through run_main() if I hit enter in the main input OR click the button. Is there even a way to change the slot of a signal once it's been set?