I have data coming from two places one by this

Qt Code:
  1. def __pathsList(self):
  2. defaultList = self.xmlDataObj.xmlData().values()
  3. completerList = QtCore.QStringList()
  4. for i in defaultList:
  5. completerList.append(QtCore.QString(i))
  6. lineEditCompleter = QtGui.QCompleter(completerList)
  7. # lineEditCompleter.setCompletionMode(QtGui.QCompleter.UnfilteredPopupCompletion)
  8. self.addPathEdit.setCompleter(lineEditCompleter)
To copy to clipboard, switch view to plain text mode 
and second by

Qt Code:
  1. def __dirCompleter(self):
  2. # completer = TagsCompleter(self.addPathEdit, self.xmlDataObj.xmlData().values())
  3. dirModel = QtGui.QFileSystemModel()
  4. dirModel.setRootPath(QtCore.QDir.currentPath())
  5. dirModel.setFilter(QtCore.QDir.AllDirs | QtCore.QDir.NoDotAndDotDot | QtCore.QDir.Files)
  6. dirModel.setNameFilterDisables(0)
  7. completer = QtGui.QCompleter(dirModel,self)
  8. completer.setModel(dirModel)
  9. print dir(completer)
  10. completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
  11. self.addPathEdit.setCompleter(completer)
To copy to clipboard, switch view to plain text mode 

I want the first method to execute when the QLineEdit is in focus, but the second one to execute when user types "/" for OSx or Linux or single alphabet for windows users.

what I do not know is how to show the list right away when the QLineEdit is in focus but instead the QCompleter popups the list on typing "/" when I want when the user enters "/" then the second methods does the QCompleteion for dirCompletion .

Any help will be greatly appreciated,