title: How to access QPushButton from another python file?
body: <p>I am creating an application and have a python file for button methods. I am trying to change the stylesheet of the button by clicking on it, however, I cannot alter the button from outside the class.</p>
  <p>Example: (ui is from a QtDesigner UI file)</p>
  <p>Python file Main:</p>
  <pre><code>class Main(QtWidgets.QMainWindow, Ui_MainWindow):
      def __init__(self, parent=None):
          super(Main, self).__init__(parent)
          self.setupUi(self)
          self.button.clicked.connect(ButtonMethods.buttonPushButtonClicked)
  </code></pre>
  <p>Python file ButtonMethods:</p>
  <pre><code>from Main import Main
  def buttonPushButtonClicked():
      Main.button.setStyleSheet(...)
  </code></pre>
  <p>Is it possible to do it this way? I have many buttons and I don't want to cram all the methods into the same class.</p>