title: PyQt5 button to run function and update LCD
body: <p>I am getting started with creating GUI's in PyQt5 with Python 3.  At the click of the button I want to run the "randomint" function and display the returned integer to the QLCDNumber named "lcd".</p>
  
  <p>Here's my code:</p>
  
  <pre><code>import sys
  from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QPushButton, QLCDNumber
  from random import randint
  
  
  class Window(QWidget):
      def __init__(self):
          super().__init__()
          self.initui()
  
      def initui(self):
          lcd = QLCDNumber(self)
  
          button = QPushButton('Generate', self)
          button.resize(button.sizeHint())
  
          layout = QVBoxLayout()
          layout.addWidget(lcd)
          layout.addWidget(button)
  
          self.setLayout(layout)
          button.clicked.connect(lcd.display(self.randomint()))
  
          self.setGeometry(300, 500, 250, 150)
          self.setWindowTitle('Rand Integer')
          self.show()
  
      def randomint(self):
          random = randint(2, 99)
          return random
  
  if __name__ == '__main__':
      app = QApplication(sys.argv)
      ex = Window()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>I am getting the output:</p>
  
  <blockquote>
    <p>TypeError: argument 1 has unexpected type 'NoneType'</p>
  </blockquote>
  
  <p>How can I get the LCD to display the output from function "randomint"?</p>