title: how to get the row number of an item in the qlistwidget using Pyqt5 in python
body: <p>How to get the row number of each item in the QlistWidget  i a able to get the text of the item but not the row number.</p>
  
  <p>the expected result :</p>
  
  <ul>
  <li>current row ==> 1</li>
  <li>checkpath  Displayed Path => C:/Users/test/Downloads\cv.docx</li>
  </ul>
  
  <p><strong>i don't know how to return the row number i tried the index but it return a wrong result.</strong></p>
  
  <p>I think this is the line that must changed:</p>
  
  <pre><code>                print("current row ==&gt; {} \n checkpath  Displayed Path =&gt; {}".format(index,self.fullPath))
  </code></pre>
  
  <p>where <strong>index</strong> is used in <strong>enumarate</strong>.</p>
  
  <h1>code:</h1>
  
  <pre><code>def checkPath(self,folder):         # Funtion to check the given path for the wanted extension (Files)
  
          try:
              directory=folder
  
              whichChecked=""
              for root,dirs,files in os.walk(directory):
  
                  for index,filename in enumerate(files):
                      if len(self.lineEdit_Ext.text())&gt;0:
                          self.lineEdit_Ext.setStyleSheet("background-color:white")
                          self.lineEdit_Ext.setPlaceholderText("Enter The Filetype Extention Here")
  
                          if filename.endswith(self.lineEdit_Ext.text()):
                              fullPath=os.path.join(root,filename)
                              print(fullPath)
                              self.fileList.append(fullPath)
  
                      elif self.rdBtn_docx.isChecked() and filename.endswith("docx") or filename.endswith("doc") :
                          self.fullPath=os.path.join(root,filename)
  
                          index = +1
  
  
                          print("current row ==&gt; {} \n checkpath  Displayed Path =&gt; {}".format(index,self.fullPath))
  
                          print("=========================================")
                          self.fileList.append(self.fullPath)
  
                          whichChecked="docx - doc Ext was Selected"
  
                      if len(self.fileList) &gt; 0:
                          self.lineEdit_Ext.setStyleSheet("bacground-color:white;")
                          self.lineEdit_Ext.setPlaceholderText("{0}".format(whichChecked))
                      else:
                          self.lineEdit_Ext.setStyleSheet("background-color:Red")
                          self.lineEdit_Ext.setPlaceholderText("No Ext is Specified")                            
  
  
              self.ListFilesInViewer(self.fileList)           # add the list into the  listWidgetPDFlist 
  
  
              return folder
  
          except Exception as e:
              print("this error occure {0}".format(e))
  </code></pre>