title: Trying to open a home window after completing the login page
body: <pre><code>        self.pushButton = QPushButton(self.verticalWidget)
          self.pushButton.setObjectName(u&quot;pushButton&quot;)
          self.pushButton.clicked.connect(self.login)
          self.verticalLayout_2.addWidget(self.pushButton)
          
          self.pushButton2 = QPushButton(self.verticalWidget)
          self.pushButton2.setObjectName(u&quot;pushButton2&quot;)
          self.verticalLayout_2.addWidget(self.pushButton2)
          self.pushButton2.setDisabled(True)
  </code></pre>
  <pre><code>
      def login(self):
          email = self.emailLineEdit.text()
          password = self.passwordLineEdit.text()
          if email and password is not None:
              mydb = mc.connect(
                  host=&quot;localhost&quot;,
                  user=&quot;root&quot;,
                  password=os.getenv('mysqlpass'),
                  database=&quot;cinedeck&quot;)
  
              mycursor = mydb.cursor()
              query = f&quot;SELECT email, password FROM user_info WHERE email = '{email}'&quot;
              mycursor.execute(query)
              result = mycursor.fetchone()
              mydb.close()
              if result:
                  if result[1] == password:
                      QMessageBox.about(self, &quot;Success ✅&quot;, &quot;Successfully logged into Cinedeck! Click again to continue.&quot;)
                      self.pushButton2.setDisabled(False)
                      self.pushButton2.clicked.connect(self.openhomescreen)
                  else:
                      QMessageBox.about(self, &quot;Error ⚠️&quot;, &quot;Incorrect Password!&quot;)
                  
              else:
                  QMessageBox.about(self, &quot;Error ⚠️&quot;, &quot;Account does not exist!&quot;)
          else:
              QMessageBox.about(self, &quot;Error &quot;, &quot;Please Enter Email or Password.&quot;)
              
      def openhomescreen(self):
          self.selfhomewindow.setupUi(self)
  </code></pre>
  <p>Could you suggest an easier method to open another window after the login. I tried doing a QMessageBox message that would open the new window when the button on it is clicked but I'm not able to figure out how to do it.</p>