title: TypeError : decorated slot has no signal compatible with doubleClicked(QModelIndex)
body: <p>i was working on a project and i have deleted it by mistake. so while i was rewriting it i found a problem.</p>
  
  <p>i have this QDialog that shows Directory View with (QTreeView), and when i try to launch it from QMainWindow(Parent Class) it fails.</p>
  
  <p>so this is the code that remembered:</p>
  
  <pre><code># -*- coding: utf-8 -*-
  
  # Form implementation generated from reading ui file 'Dialog.ui'
  #
  # Created by: PyQt5 UI code generator 5.11.3
  #
  # WARNING! All changes made in this file will be lost!
  
  import pandas as pd
  from PyQt5 import QtCore, QtGui, QtWidgets
  from PyQt5.QtWidgets import (QFileSystemModel, QDialog)
  
  class Ui_Dialog(QDialog):
  
      def __init__(self, tableWidget, statusbar):
          super(Ui_Dialog, self).__init__()
          self.setupUi(self)
          self.qtRectangle = self.frameGeometry()
          self.centerPoint = QtWidgets.QDesktopWidget().availableGeometry().center()
          self.qtRectangle.moveCenter(self.centerPoint)
          self.move(self.qtRectangle.topLeft())
          self.tableWidget = tableWidget
          self.statusbar = statusbar
  
      def setupUi(self, Dialog):
          Dialog.setObjectName("Dialog")
          Dialog.resize(500 , 500)
          self.horizontalLayout_2 = QtWidgets.QHBoxLayout(Dialog)
          self.horizontalLayout_2.setObjectName("horizontalLayout_2")
          self.treeView = QtWidgets.QTreeView(Dialog)
          self.model = QFileSystemModel()
          self.model.setRootPath("")
          self.treeView.setModel(self.model)
          self.treeView.setObjectName("treeView")
          self.horizontalLayout_2.addWidget(self.treeView)
  
          self.retranslateUi(Dialog)
          QtCore.QMetaObject.connectSlotsByName(Dialog)
  
          self.treeView.doubleClicked.connect(self.import_data)
  
      @QtCore.pyqtSlot("QModelIndex", "QModelIndex")
      def import_data(self, signal):
          filePath = self.model.filePath(signal)
          df = pd.read_csv(filePath)
  
          self.tableWidget.setColumnCount(len(df.columns))
          self.tableWidget.setRowCount(len(df.index))
  
          for index in range(len(df.index)):
              for col in range(len(df.columns)):
                  self.tableWidget.setHorizontalHeaderLabels(df.columns)
                  self.tableWidget.setItem(
                      index,
                      col,
                      QtWidgets.QTableWidgetItem(df.iat[index, col]))
  
          self.tableWidget.resizeRowsToContents()
          self.tableWidget.resizeColumnsToContents()
          self.tableWidget.setSortingEnabled(True)
          self.statusbar.showMessage("Data uploaded", 1200)
  
      def retranslateUi(self, Dialog):
          _translate = QtCore.QCoreApplication.translate
          Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
  </code></pre>
  
  <p>When i run it, it raises a TypeError :</p>
  
  <pre><code>PS C:\Users\pc\Desktop\DV_GUI\py files&gt; &amp; python 
  "c:/Users/pc/Desktop/DV_GUI/py files/MainWindow.py"
  Traceback (most recent call last):
  File "c:/Users/pc/Desktop/DV_GUI/py files/MainWindow.py", line 127, in show_dir
  sys_file = Ui_Dialog(self.tableWidget, self.statusbar)
  File "c:\Users\pc\Desktop\DV_GUI\py files\Dialog.py", line 18, in __init__
  self.setupUi(self)
  File "c:\Users\pc\Desktop\DV_GUI\py files\Dialog.py", line 42, in setupUi
  self.treeView.doubleClicked.connect(self.import_data)
  TypeError: decorated slot has no signature compatible with doubleClicked(QModelIndex)
  </code></pre>
  
  <p>here's the code that launches the QDialog:</p>
  
  <pre><code>    self.actionOpen.triggered.connect(self.show_dir)
  
  def show_dir(self):
      sys_file = Ui_Dialog(self.tableWidget, self.statusbar)
      sys_file.exec_() 
  </code></pre>
  
  <p>i remember the code that i've wrote but it seems like something has slipped off of my mind.</p>