title: How to tell if two QPushButtons have been pressed (Python)
body: <p>I need to call a member function when both of my QPushButtons have been pressed.  I cannot find a way to keep track of if they have been pressed.</p>
  
  <p>I call a function when either of the buttons are clicked using ...clicked.connect(func) and within that function I have tried to: 1) return a value, 2) update a member variable. Below I have shown how I tried to create and update member variable and use a conditional to see if both variables were true so that I could call my next function.</p>
  
  <pre><code>def __init__(self, parent=None):
      super(MorphingApp, self).__init__(parent)
      self.setupUi(self)
  
      self.startIm = None
      self.endIm = None
  
      self.initialState()
  
  
  def initialState(self):
  
      self.btn_loadStart.clicked.connect(self.loadImageS)
      self.btn_loadEnd.clicked.connect(self.loadImageE)
  
      if(self.startIm is True and self.endIm is True):
          self.loadedState()
  
  
  def initialState(self):
      self.startIm = True
  
  
  def loadImageE(self):
      self.endIm = True
  </code></pre>
  
  <p>My functions of course do things, but I removed parts that were irrelevant.   When I run the GUI I am able to load the images but the function that is supposed to be called after both buttons have been pushed is not called.  I know this because the state of the GUI is not changing as I intend.</p>
  
  <p>This is my first time posting a question so let me know how to improve :)</p>