title: Python: How to enable button if the QlineEdit is Filled
body: <p>Can someone tell me what approach or what logic so the QPushbutton will be enable if all the fields are not empty. I'm making a simple form that you can only push the button if the fields are not empty.</p>
  
  <pre><code>class Ui_MainWindow(object):
      def setupUi(self, MainWindow):
          MainWindow.setObjectName("MainWindow")
          MainWindow.resize(392, 232)
          self.centralwidget = QtWidgets.QWidget(MainWindow)
          self.centralwidget.setObjectName("centralwidget")
          self.lineEdit = QtWidgets.QLineEdit(self.centralwidget)
          self.lineEdit.setGeometry(QtCore.QRect(140, 60, 113, 20))
          self.lineEdit.setObjectName("lineEdit")
          self.lineEdit_2 = QtWidgets.QLineEdit(self.centralwidget)
          self.lineEdit_2.setGeometry(QtCore.QRect(140, 90, 113, 20))
          self.lineEdit_2.setObjectName("lineEdit_2")
          self.label = QtWidgets.QLabel(self.centralwidget)
          self.label.setGeometry(QtCore.QRect(100, 60, 47, 13))
          self.label.setObjectName("label")
          self.label_2 = QtWidgets.QLabel(self.centralwidget)
          self.label_2.setGeometry(QtCore.QRect(100, 90, 47, 13))
          self.label_2.setObjectName("label_2")
          self.pushButton = QtWidgets.QPushButton(self.centralwidget)
          self.pushButton.setEnabled(False)
          self.pushButton.setGeometry(QtCore.QRect(300, 170, 75, 23))
          self.pushButton.setObjectName("pushButton")
          MainWindow.setCentralWidget(self.centralwidget)
          self.statusbar = QtWidgets.QStatusBar(MainWindow)
          self.statusbar.setObjectName("statusbar")
          MainWindow.setStatusBar(self.statusbar)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/O51wH.png" alt="GUI"></p>
  
  <p>This is a sample code.</p>