title: PyQt - object has no attribute 'connect'
body: <p>I am using PyQt5, and I want to make a Drag&amp;Drop system.</p>
  
  <p>I got the code on this post : <a href="https://stackoverflow.com/questions/4151637/pyqt4-drag-and-drop-files-into-qlistwidget">PyQT4: Drag and drop files into QListWidget</a></p>
  
  <p>When I Run, I got the following error :  AttributeError: 'MainForm' object has no attribute 'connect'</p>
  
  <p>The code: </p>
  
  <pre><code>import sys
  import os
  from PyQt5.Qt import *
  from PyQt5.QtGui import *
  from PyQt5.QtCore import *
  
  class TestListView(QListWidget):
      def __init__(self, type, parent=None):
          super(TestListView, self).__init__(parent)
          self.setAcceptDrops(True)
          self.setIconSize(QSize(72, 72))
  
      def dragEnterEvent(self, event):
          if event.mimeData().hasUrls:
              event.accept()
          else:
              event.ignore()
  
      def dragMoveEvent(self, event):
          if event.mimeData().hasUrls:
              event.setDropAction(Qt.CopyAction)
              event.accept()
          else:
              event.ignore()
  
      def dropEvent(self, event):
          if event.mimeData().hasUrls:
              event.setDropAction(Qt.CopyAction)
              event.accept()
              links = []
              for url in event.mimeData().urls():
                  links.append(str(url.toLocalFile()))
              self.emit(Qt.SIGNAL("dropped"), links)
          else:
              event.ignore()
  
  class MainForm(QMainWindow):
      def __init__(self, parent=None):
          super(MainForm, self).__init__(parent)
  
          self.view = TestListView(self)
          self.connect(self.view, Qt.SIGNAL("dropped"), self.pictureDropped)
          self.setCentralWidget(self.view)
  
      def pictureDropped(self, l):
          for url in l:
              if os.path.exists(url):
                  print(url)
                  icon = QIcon(url)
                  pixmap = icon.pixmap(72, 72)
                  icon = QIcon(pixmap)
                  item = QListWidgetItem(url, self.view)
                  item.setIcon(icon)
                  item.setStatusTip(url)
  
  def main():
      app = QApplication(sys.argv)
      form = MainForm()
      form.show()
      app.exec_()
  
  if __name__ == '__main__':
      main()
  </code></pre>