title: How to transfer date selection from calendar widget to QLineEdit
body: <p>I'm playing around with PyQt5 (which I just started learning yesterday).</p>
  
  <p>I'm trying to create a window/layout, with two entry boxes (to enter 'start' and 'end' dates), so that when each one is clicked, the <code>QCalendarWidget</code> is triggered to popup, and when the user selects the date, the date is entered into the <code>QLineEdit</code> field. </p>
  
  <p>So far, it simply shows a blank window, but I'm not sure what I'm doing wrong. </p>
  
  <pre><code>class selectedDate(QWidget):
      def __init__(self):
          super(selectedDate, self).__init__()
          self.layout = QVBoxLayout(self)
          self.selection = QLineEdit("Click to Enter Date", self)
          self.layout.addWidget(self.selection)
          self.layout.addWidget(self.selection)
          self.selection.installEventFilter(self)
  
  
      def mousePressEvent(self, e):
          self.myCal()
          super(selectedDate, self).mousePressEvent(e)
  
      def eventFilter(self, object, e):
          if self.layout.indexOf(object) != -1:
              if e.type() == e.MouseButtonPress:
                  pass
  
          return super(selectedDate, self).eventFilter(object, e)
  
  
  
      def myCal(self):
          self.cal = QCalendarWidget(self)
          self.cal.setGridVisible(True)
          self.cal.move(10, 20)
          self.cal.clicked[QDate].connect(self.showDate)
  
          self.date = self.cal.selectedDate()
          self.selection.setText(self.date.toString())
  
          self.setGeometry(300, 300, 415, 350)
          self.setWindowTitle('Calendar')
          self.show()
  
      def showDate(self, date):
          self.selection.setText(date.toString())
  
  app = QApplication(sys.argv)
  top = selectedDate()
  app.exec_()
  </code></pre>